Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - lapinkulta

Pages: [1] 2 3
1
Discussion & Troubleshooting / Re: if in templates
« on: June 23, 2006, 11:41:26 AM »
oh and it's not smarty. sorry for that....

i have done that and it doesn't work. (forgot to post that line in my initial posting).
I can display the variable {google} which shows 1 or nothing but I can not make a if query like {if google}x{endif google}. It shows the tags.

Anyway i have now placed for that reason the whole google adsense code in php, assigned to the variable "google". The whole thing is in page_header.php

Now this works fine on all category pages, but not in the details pages. Why not? $cat_id also exists there....
What would I need to change to get it work on detail pages also?

Greetings,
lapinkulta

2
Discussion & Troubleshooting / if in templates
« on: June 22, 2006, 06:59:53 PM »
hi!
i display google adsense on my website. in some categories it is not allowed.
i have adsense code in header.html and footer.html

bye now i have added this to "page_header.php"
Code: [Select]
if ($cat_id == '3' || $cat_id == '4' || $cat_id == '5' || $cat_id == '6' || $cat_id == '7' || $cat_id == '508' || $cat_id == '509') {

} else {
$google = "1";
}

and tried to do something like that

Code: [Select]
{if google}x{endif google}
in the templates which wont work. it shows me the smarty tags as pour text in the html page.

somehow i remember smarty if/else things to be easier... Please let me know how to solve this.

Greetings
lapinkulta


3
Mods & Plugins (Releases & Support) / Re: [MOD] Simple News Publishing
« on: October 31, 2005, 04:43:40 PM »
Hi!
The archive shows now all news, but the {header} and {footer} tags are not rendered anymore. How comes?
greetings,
lapinkulta

4
thanks, works great now.  :D

5
Yes, it shows only lightbox.htm without the language appended which comes from this code piece:

Code: [Select]
        else {
          $url = str_replace('lightbox.php', 'lightbox.htm', $url);
        }

greetings,
lapinkulta

6
Hi Vano!

I have still problem with the standard links.

cat1_de.htm etc. works fine.

what doesn't work are the links to register, lightbox, search etc.

They should look like "register_de.htm"
but they look like "register.php" now even without the correct language appended.

I understand what you have done to the original code to solve my problem with the §ext variable, but I have no idea why these standard links do not work now.

Greetings,
lapinkulta

8
Hi Vano!

I'm not sure what is wrong, but my admin section still doesn't work with this code. It said that I am not administrator etc.
If I remove it, it is fine.

greetings,
lapinkulta

9
Hi Vano!

With this code I can not access the admin area anymore...

Greetings,
lapinkulta

10
Not with this code as

Code: [Select]
if (empty($_GET['l'])) { ....

in the first row checks if there is a language specified in the URL. If not, it will always choose the language based on browser setting.

greetings,
lapinkulta

11
That the problem I addressed in my last posting. What I have done is a small change in the sessions.php in order that even for the standard language the "l=language" is attached.

find
Code: [Select]
    if (!empty($l)) {
      $url .= strpos($url, '?') !== false ? $amp : "?";
      $url .= "l=".$l;
    }

and replace with:

Code: [Select]
   if (!empty($l)) {
      $url .= strpos($url, '?') ? '&' : '?';
      $url .= "l=".$l;
   }
   if (empty($l)) {
      $url .= strpos($url, '?') ? '&' : '?';
      $url .= "l=english";
   }

be sure to change "english" to whatever is your standard language.

works fine with me.

greetings,
lapinkulta

12
Hi Matthias!

If you place my code where Vano said, it works quite fine.

Only problem, but nothing to to with this code, is that for the standard language no l=english string is attached.
See: http://www.4homepages.de/forum/index.php?topic=6729.120

I'm waiting for a solution on that...

Greetings,

lapinkulta

13
thanks, that's the correct place to include...

greetings,
lapinkulta

14
OK i have changed:

Code: [Select]
    if (!empty($l)) {
      $ext = "_".$l;
    }

to

Code: [Select]
    if (!empty($l)) {
      $ext = "_".$l;
    }
    if (empty($l)) {
      $ext = "_english";
    }

to have also "_english" appended for the standard language.

What does NOT work:


For the links to lightbox, search, register, member etc. the language (either standard or other, with or without that change above) is not appended...

Greetings,
lapinkulta

15
Hi Vano!

Thanks works great.

Only problem is, that links for the standard language are always generated without the appended language.
So cat1.htm instead of cat1_english.htm

Where could I change that so even for the standard language the string is appended (or the filename correctly written).

Thanks,
lapinkulta

Pages: [1] 2 3