| ez |
|
|---|---|
|
Version : Genoa 0.6.22
<!-- IF {PHP.usr.lang} == "en" -->
Where it goes wrong is when i have two {PAGE_TEXT_ID_xx} in there....
It starts something like this: It ends like this inside a loop that loops through all found tags:
// Assign tag My best guess:
I am guessing it goes wrong with the assign inside the Template...
==- I say: Keep it EZ -==
|
| GHengeveld |
|
|---|---|
|
Several things are wrong with this code (pagetextbyidn.code.php). Try this code:
<?php
if (!defined('SED_CODE')){die('Wrong URL.'); }
$currenttpl = file_get_contents($mskin);
if (mb_strpos($currenttpl, "{PAGE_TEXT_ID_") !== false)// if tag exist on page
{
$matches = array();
preg_match_all("#{(?P<tag>PAGE_TEXT_ID_(?P<id>[0-9]+))}#", $currenttpl, $matches, PREG_SET_ORDER);
foreach ($matches as $match){
$p_tag = $match['tag'];
$p_id = $match['id'];
etc...
Update: fixed the regex Відредаговано: GHengeveld (07.05.2012 22:21, 13 років тому) |
| ez |
|
|---|---|
|
OK, i will check your code.. Thanks for responding, and ill try that and post the results here.. ==- I say: Keep it EZ -==
|
| GHengeveld |
|
|---|---|
|
Small mistake in the regex, the braces should be outside of the tag. "#(?P<tag>{PAGE_TEXT_ID_(?P<id>[0-9]+)})#" should be "#{(?P<tag>PAGE_TEXT_ID_(?P<id>[0-9]+))}#" Your tpl IF block should work just fine. |
| ez |
|
|---|---|
|
Thanks, this solution works fine..
I never would suspected the regex .. ==- I say: Keep it EZ -==
|
| Trustmaster |
|
|---|---|
|
What browser do you use and is javascript enabled? Does it emit any error messages? May the Source be with you!
|
| ez |
|
|---|---|
|
no console messages what so ever... and off course i have JS enabled.
i just go to... http://www.cotonti.com/thanks?user=68 ==- I say: Keep it EZ -==
|
| Twiebie |
|
|---|---|
|
http://www.cotonti.com/thanks?user=68 is a list of "Thanks" a user has received. You need to click on 'Thank You' above the post. Should have a link such as: http://www.cotonti.com/thanks?a=thank&ext=forums&item=34231 |
| ez |
|
|---|---|
|
DAMN... i am getting blind.... i think.... sorry about that ==- I say: Keep it EZ -==
|
| Twiebie |
|
|---|---|
|
:) |
| GHengeveld |
|
|---|---|
|
Patched version of pagetextbyidn.code.php is here: https://gist.github.com/2630919 I posted a comment on the plugin page with a link to the patch. Thanks for the thanks. BTW, love it when code I didn't even try just works :) |
| ez |
|
|---|---|
|
==- I say: Keep it EZ -==
|