4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
August 15, 2018, 10:36:25 PM

Login with username, password and session length
Search:     Advanced search
Togle to toolbar
Translate this page with =>
Translate this page >
* Home Help Search Login Register
 
+  4images Forum & Community
|-+  4images Help / Hilfe
| |-+  Bug Fixes & Patches
| | |-+  [1.7.7 - 1.7.9] {categories},{details},{index},{lightbox},etc tags don't work
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] 2 » »» Print
Author Topic: [1.7.7 - 1.7.9] {categories},{details},{index},{lightbox},etc tags don't work  (Read 52540 times)
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 577

mmm PHP...


View Profile WWW
« on: November 20, 2010, 06:58:39 PM »

Since v1.7.7 4images supports conditional tags that can be used to display/hide content depend on which page is opened:
Quote from: changes in v1.7.6   [Expand]
- Added more conditional tags (categories, details,index, member, postcards, register, search, top) for using {if index}...{if index} for homepage, {if details}...{endif details} for details.php page, etc.
On some pages these tags will not work "properly", because they are overwritten by other parts of the script.

The fix:
Open includes/page_header.php
Find:
4images v1.7.7
1
2
3
4
5
6
$list = array("categories""details""index""member""postcards""register""search""top");
$array = array();
foreach (
$list as $name)
{
  
$array[$name] = ($name == $file);
}

4images v1.7.8 - 1.7.9
1
2
3
4
5
6
7
8
9
10
11
12
13
$array = array(
    
"categories" => false,
    
"details"    => false,
    
"index"      => false,
    
"member"     => false,
    
"postcards"  => false,
    
"register"   => false,
    
"search"     => false,
    
"top"        => false
);
if ( isset(
$array[$file]) ) {
  
$array[$file] = true;
}


Replace with:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
$array = array(
    
"page_categories" => false,
    
"page_details"    => false,
    
"page_index"      => false,
    
"page_lightbox"   => false,
    
"page_member"     => false,
    
"page_postcards"  => false,
    
"page_register"   => false,
    
"page_search"     => false,
    
"page_top"        => false
);
if ( isset(
$array["page_" $file]) ) {
  
$array["page_" $file] = true;
}

4images v1.7.8 - 1.7.9
Open lightbox.php
Find:
1
define('ROOT_PATH''./');

Insert below below:
1
define('MAIN_SCRIPT'__FILE__);

After these changes you can use in templates:
{page_categories}
{page_details}
{page_index}
{page_lightbox}
{page_member}
{page_postcards}
{page_register}
{page_search}
{page_top}

For example you can display text only on details.php page:
1
{if page_details}this is details.php page{endif page_details}

Or you can display text on all pages except register.php:
1
{ifno page_register}this is not register.php page{endifno page_register}
« Last Edit: November 28, 2010, 08:52:56 PM by V@no » Logged

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)
x23piracy
Sr. Member
****
Offline Offline

Posts: 420

Thank You
-Given: 48
-Receive: 41


View Profile WWW
« Reply #1 on: November 21, 2010, 08:37:19 PM »

Hi,

is this working for you?
I've done the change for 1.7.9 but the tag is ignored.


Greetz X23
Logged


Don't trust in md5 it's unsafe change your 4i galerys password hash algorythm! second pw db field, create new hashes over some time, deny old hash. Help members that cry, send informationen mail to the rest. Camouflage new pw hash in cookie. Done!

--(◔̯◔)--
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 577

mmm PHP...


View Profile WWW
« Reply #2 on: November 21, 2010, 09:12:01 PM »

If you referring to the code you showed (I merged your reply to your original topic), then it's the other tags that not being showed, because they are not registered yet when header.html is parsed. Simply put, you cannot use every tag that available in main template in header.html
To confirm that this fix works, try this:
1
{if lightbox}this only visible at lightbox page{endif lightbox}
Logged

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)
x23piracy
Sr. Member
****
Offline Offline

Posts: 420

Thank You
-Given: 48
-Receive: 41


View Profile WWW
« Reply #3 on: November 21, 2010, 09:52:57 PM »

1
{if lightbox}this only visible at lightbox page{endif lightbox}

Hi,

i pasted your code above for testing if tag works into my lightbox.html template file
but the text is not visible if im on the lightbox page.

Hmm...


Greetz X23
Logged


Don't trust in md5 it's unsafe change your 4i galerys password hash algorythm! second pw db field, create new hashes over some time, deny old hash. Help members that cry, send informationen mail to the rest. Camouflage new pw hash in cookie. Done!

--(◔̯◔)--
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 577

mmm PHP...


View Profile WWW
« Reply #4 on: November 21, 2010, 10:52:11 PM »

Oh, missed another line in lightbox.php
I've updated original post. Sorry about that.
Logged

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)
x23piracy
Sr. Member
****
Offline Offline

Posts: 420

Thank You
-Given: 48
-Receive: 41


View Profile WWW
« Reply #5 on: November 21, 2010, 11:20:14 PM »

Oh, missed another line in lightbox.php
I've updated original post. Sorry about that.

thx no problem the important thing is it's fixed  Good

Edit:

Hi,

is it possible that {if categories} is also not working? it has no effect for me (1.7.9)


Greetz X23
« Last Edit: November 28, 2010, 07:50:44 AM by x23piracy » Logged


Don't trust in md5 it's unsafe change your 4i galerys password hash algorythm! second pw db field, create new hashes over some time, deny old hash. Help members that cry, send informationen mail to the rest. Camouflage new pw hash in cookie. Done!

--(◔̯◔)--
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 577

mmm PHP...


View Profile WWW
« Reply #6 on: November 28, 2010, 06:31:28 PM »

Did you upgrade to v1.7.9 or it's a fresh installation? It's working fine on fresh v1.7.9
Logged

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)
x23piracy
Sr. Member
****
Offline Offline

Posts: 420

Thank You
-Given: 48
-Receive: 41


View Profile WWW
« Reply #7 on: November 28, 2010, 08:07:56 PM »

Did you upgrade to v1.7.9 or it's a fresh installation? It's working fine on fresh v1.7.9

Hi,

it's s freah installation, but here it's not working.


Greetz X23
Logged


Don't trust in md5 it's unsafe change your 4i galerys password hash algorythm! second pw db field, create new hashes over some time, deny old hash. Help members that cry, send informationen mail to the rest. Camouflage new pw hash in cookie. Done!

--(◔̯◔)--
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 577

mmm PHP...


View Profile WWW
« Reply #8 on: November 28, 2010, 08:54:43 PM »

You are correct. This bug turned out to be bigger then originally thought...

I've renamed this topic and updated the instructions.
Logged

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)
x23piracy
Sr. Member
****
Offline Offline

Posts: 420

Thank You
-Given: 48
-Receive: 41


View Profile WWW
« Reply #9 on: November 28, 2010, 09:18:31 PM »

You are correct. This bug turned out to be bigger then originally thought...

I've renamed this topic and updated the instructions.

Hi,

i try telling things that are true  Mr. Green
Hope to here again from you with the fix  Good

Maybe my define category as subcategorie or create them as those don't work problem is another courious bug?
(There is an own thread existing) http://www.4homepages.de/forum/index.php?topic=28296.0


Greetz X23
Logged


Don't trust in md5 it's unsafe change your 4i galerys password hash algorythm! second pw db field, create new hashes over some time, deny old hash. Help members that cry, send informationen mail to the rest. Camouflage new pw hash in cookie. Done!

--(◔̯◔)--
WilliamRU
Guest
« Reply #10 on: October 24, 2011, 03:04:46 PM »

?
Logged
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 577

mmm PHP...


View Profile WWW
« Reply #11 on: October 24, 2011, 03:25:33 PM »

Ìîãó ÿ ó Âàñ ñïðîñèòü?
Нет,  не можете, а вот что вы можете - так это получить бан за спам, который также будет распространён на тысячи других форумах.
Первое и последнее предупреждение. Будем продолжать?
Logged

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)
paule
Jr. Member
**
Offline Offline

Posts: 64

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #12 on: March 25, 2013, 08:13:15 PM »

Hallo,

ich habe den code replaced (1.7.7).
{page_categories}
{page_details}
{page_index}
{page_lightbox}
{page_member}
{page_postcards}
{page_register}
{page_search}
{page_top} funktionieren perfekt.

Ich habe einige neue Templates : Sport, Reise, AGB, Impressum ......
Wie kann ich die neuen Seiten auf die selbe Weise einbinden?

www.kosecki.de

Gru paule

Logged
Rembrandt
4images Moderator
4images Guru
*****
Offline Offline

Posts: 4187

Thank You
-Given: 116
-Receive: 899

Vienna


View Profile WWW
« Reply #13 on: March 26, 2013, 07:10:49 AM »

Hi!
...Ich habe einige neue Templates : Sport, Reise, AGB, Impressum ......
Wie kann ich die neuen Seiten auf die selbe Weise einbinden?
...
http://www.4homepages.de/forum/index.php?topic=4996.0

mfg Andi
Logged

Meine 4Images Modifikationen  Now over 100 Modification Online!    Meine 4images Demo Seite


Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
paule
Jr. Member
**
Offline Offline

Posts: 64

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #14 on: March 26, 2013, 01:25:02 PM »

Hi,

ich glaube ich habe es nicht richtig erklrt was ich will....
Es geht um den Seitentitel-

mein Seitentitel im header.html:

<title>{site_name} {if page_lightbox}- {lang_lightbox}{endif page_lightbox} {if page_search}- {lang_new_images}{endif page_search} {if page_maincategories}- {Images_stories}{endif page_maincategories}{if page_categories}- {cat_name}{endif page_categories} {if page_details}- {cat_name} - {image_name}{endif page_details}</title>

Zeigt im Seitentitel: Seitenname - Datenbank oder Seitentitel - Leuchtkaten oder Seitentitel - Kategorie an.

Jetzt mchte ich auf dem gleichen Weg den Seitentitel der Seiten "Sport", "AGB", "Impressum" und so weiter darstellen.
Die Seiten werden mit <a href="<?=$site_sess->url(ROOT_PATH."index.php?template=AGB")?>">{AGB}</a> aufgerufen.

Kann das mit page_header.php - page_sport oder page_AGB funktionieren?

gru paule


Logged
Pages: [1] 2 » »» Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.064 seconds with 19 queries.
Post your comments here