1
technigrafa
Upgrading to 2.0.14 Stopped <{php}> includes

I just upgraded a site from 2.0.13.2 to 2.0.14 and my <{php}> includes in my theme aren't showing up anymore.

This still works though:
<{php}> print "Test"; <{/php}>


Anyone have any idea how to remedy this?

The only other thing I changed recently that might be related, is I turned off "allow_url_fopen" in PHP.INI as the Protector module recommends.

Thanks,
/daniel

2
neill
Re: Upgrading to 2.0.14 Stopped includes
  • 2006/7/23 14:12

  • neill

  • Just popping in

  • Posts: 16

  • Since: 2006/7/23


i have a similar problem
im trying to implement xlanguage links into the theme
<{php}>
global 
$cnurl$enurl;
        
$cnurl xoops_getenv('PHP_SELF')."?".$query_string."lang=schinese";
        
$enurl xoops_getenv('PHP_SELF')."?".$query_string."lang=english";
<{/
php}>

when i call $cnurl or $enurl in template, i get my home address

3
neill
Re: Upgrading to 2.0.14 Stopped includes
  • 2006/7/23 15:36

  • neill

  • Just popping in

  • Posts: 16

  • Since: 2006/7/23


for my problem above, i have a workaround using javascript, if anyone interested, here is my code

insert this before you call the function
<{literal}>
    <
script type="text/javascript">
    <!--
    function 
langurl(lang)
    {
        var 
strHref window.location.href;
        if ( 
strHref.indexOf("?") > -)
        {
            var 
strQueryString strHref.substr(strHref.indexOf("?")).toLowerCase();
            var 
aQueryString strQueryString.split("&");
            var 
aQueryString_new = new Array();    
            for(var 
i=0i<aQueryString.lengthi++)
            {
                if(
aQueryString[i].substr(0,5)!="lang=")
                {
                    
                    
aQueryString_new.push(aQueryString[i]);
                }
            }
            var 
url strHref.substr(0strHref.indexOf("?"));
            
url url.toLowerCase();
            var 
finalquery aQueryString_new.join("&");
            var 
ret=(finalquery.length)? url+"?"+finalquery+"&amp;lang="+lang url+"?lang="+lang;
        }
        else
        {
            var 
ret=strHref+"?lang="+lang;
        }
        return 
ret;
    }
    
//-->
    
</script>
<{/
literal}>

BUG? the [ code] tag removes my content like "& lang" without space


then insert something like this to where you need it
<{literal}>
<
script type="text/javascript">
    <!--
    
document.write("<a href='"+langurl("schinese")+"'>&#20013;&#25991;</a>");
    
document.write("<a href='"+langurl("english")+"'>English</a>");
    
//-->
</script>
<{/
literal}>


ugly but works

4
davidl2
Re: Upgrading to 2.0.14 Stopped <{php}> includes
  • 2006/7/23 19:31

  • davidl2

  • XOOPS is my life!

  • Posts: 4843

  • Since: 2003/5/26


Remember - if you have a suspected bug - please report it here

5
neill
Re: Upgrading to 2.0.14 Stopped includes
  • 2006/7/24 8:01

  • neill

  • Just popping in

  • Posts: 16

  • Since: 2006/7/23


im pretty sure its CBB or newBB's problem
the problem is when use [ code] tag, it supposed to keep codes for example "& amp;" without space as it is, not translate it into "&" symbol

Login

Who's Online

217 user(s) are online (128 user(s) are browsing Support Forums)


Members: 0


Guests: 217


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits