Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of modifying the style of Dream Weaving Friendship Link Module

2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

This article is about the method of modifying the style of dream-weaving friendship link module. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.

Dream weaving friendship link module style how to modify?

Recently, I encountered some problems when I received a new website. What the website wants is to modify the module of friendship links. What we are using is a template for weaving dreams. This problem is also the problem encountered by most students, that is, to modify the underlying style of the template, such as the flink link module.

Picture:

{dede:flink row='24' type='image' titlelen= "24" typeid= "0"}

Underlying tag [field:link /

{/ dede:flink}

Text:

{dede:flink row='24' type='text' titlelen= "24" typeid= "0"}

Underlying tag [field:link /]

{/ dede:flink}

Row='24' means to read 24. If row is not set, the default is 24.

Titlelen= "24" indicates that the friendship link is in text form, the website name is 24 characters wide, the website code GBK is 12 Chinese characters, and the website code UTF-8 is 8 Chinese characters.

Typeid= "0" 1 Comprehensive website 2 Entertainment 3 Education 4 computer 5 Electronic Commerce 6 online Information 7 Forum 8 other types if typeid= "0" or left empty, read all types

Type='image'type='text'

Knowledge of dede links tags

When imitating the site, Weaving Dream CMS default link tag {dede:flink row='24'} by default will the underlying template generate a style? How to get rid of this default style? Didn't you find it in the home template? The underlying template is actually written in the flink.lib.php file.

Open the / include/taglib/flink.lib.php file and find:

If (trim ($ctag- > GetInnerText ()) =') $innertext = "[field:link /]"

It will be removed.

An easier way is to simply use the str_replace function to replace it in the tag.

The code is:

{dede:flink row='24' function= "(str_replace (array (','),', @ me))" /}

Just note that array is an array. By the same token, this method can be applied to many places. It is also an important function in php. Therefore, when using it, we must pay attention to this kind of problems.

Thank you for reading! On the modification of dream weaving friendship link module style method to share here, I hope the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report