Haq Using tags declination [DLE 10.1 - 10.x] English

Tag DLE 10.1 - 10.x english

Using tags [declination = X] [/ declination] in all .tpl template files and a slight change in the Tag DLE 10.1 - 10.x

This hack allows you to use tags [declination = X] [/ declination] in all .tpl template files and makes a small but convenient change in the work of these tags.

Installation:

Open index.php in the root of the site and find:
echo $tpl->result['main'];


Insert above:
$tpl->result['main'] = preg_replace_callback ( "#\[declination=(d+)\](.+?)\[/declination\]#is", "declination", $tpl->result['main'] );


Open File engine/modules/functions.php and find:
return $matches[1]." ".$word;


Replace with:
return $word;


Finish.
Now talk about the change in the work of these tags.
If you use such a structure:
 You [declination={new-pm}]message|e|i|s[/declination]


The result on the page will look like this:
You [declination={new-pm}]message|e|i|s[/declination]


This hack removes the number and space between the word, leaving only the word declination, creating a need to write a numeric tag further. Thus allows the use of more complex structures like this:
You {new-pm} [declination={new-pm}]new|th|s|s[/declination] [declination={new-pm}]reported|s|th|s[/declination]


The result on the page will look like this:
You have 10 new messages


Who do not understand, without elaboration - it would look like this:
Do you 10 10 10 new posts


Hope will be useful in your own projects;)
Thank you for your attention!

Author: vir2oz
Version DLE: 10.1 - 10.x

About the Author

Saya bagian dari CKD (pesakit buah pinggang kronik) selama 8 thn. siapa-siapa nak bantu saya untuk biaya Injection.boleh email saya. Click Profile

إرسال تعليق

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.