4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 18, 2014, 07:53:54 AM

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
|-+  General / Allgemeines
| |-+  Programming
| | |-+  if endif - html Tags
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
This topic has not yet been rated!
Author Topic: if endif - html Tags  (Read 2365 times)
Sumale.my
Addicted member
******
Offline Offline

Posts: 1785

Thank You
-Given: 156
-Receive: 75

Neverdie


View Profile
« on: March 25, 2011, 06:18:05 PM »

Hallo zusammen,

in den PHP Dateien kann man ja mit diesen Codeschnipsel abhängig davon was im ACP angegeben wurde einen gewissen Inhalt ein oder ausblenden:
1
2
3
   if($config['test'] == 1)  {
   
$test_code .= "Test\n";
   }

Ist das auch irgendwie möglich das man in den HTML Dateien so etwas verwenden kann?
1
{if if($config['test'] == 1).....

Sowas in der Art?!
Logged
MrAndrew
Sr. Member
****
Offline Offline

Posts: 301

Thank You
-Given: 9
-Receive: 12


View Profile WWW
« Reply #1 on: March 26, 2011, 08:05:00 AM »

Same question...

Is it possible to show/hide information from code below with next tags: "{if lightbox_list} {endif lightbox_list}"

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
$sql "SELECT l.lightbox_image_ids, u.user_id, l.user_id".get_user_table_field(", u.""user_name")."
	
	
	
	
FROM ("
.LIGHTBOXES_TABLE." l, ".USERS_TABLE." u)
	
	
	
	
WHERE l.lightbox_image_ids LIKE '%
$image_id%' AND u.user_id=l.user_id";
	
	
	
	

$result $site_db->query($sql);
  
$lightbox_row = array();
  while (
$row $site_db->fetch_array($result)) {
    
$lightbox_row[] = $row;
  }
  
$site_db->free_result($result);
  
$num_rows sizeof($lightbox_row);
	
if (
$num_rows) {
    for (
$i 0$i $num_rows$i++) {
	
	
	
$lightbox_list .= "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$lightbox_row[$i]['user_id'])."\">".$lightbox_row[$i]['user_name']."</a>";
	
	
	
if (
$i+!= $num_rows) {
	
	
	
	
$lightbox_list .= ", ";
	
	
	
}
	
	
	

	
	
}
	
}

//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
	
"lightbox_list" => $lightbox_list,

How to create such conditions and difficult it?

Many thanks
Logged

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

Posts: 3977

Thank You
-Given: 99
-Receive: 831

Vienna


View Profile WWW
« Reply #2 on: March 26, 2011, 01:20:00 PM »

...Is it possible to show/hide information from code below with next tags: "{if lightbox_list} {endif lightbox_list}"
...

insert below the SQL "$result"
1
 $lightbox_list="";

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)
Sumale.my
Addicted member
******
Offline Offline

Posts: 1785

Thank You
-Given: 156
-Receive: 75

Neverdie


View Profile
« Reply #3 on: March 26, 2011, 05:51:29 PM »

Hallo zusammen,

in den PHP Dateien kann man ja mit diesen Codeschnipsel abhängig davon was im ACP angegeben wurde einen gewissen Inhalt ein oder ausblenden:
1
2
3
   if($config['test'] == 1)  {
   
$test_code .= "Test\n";
   }

Ist das auch irgendwie möglich das man in den HTML Dateien so etwas verwenden kann?
1
{if if($config['test'] == 1).....

Sowas in der Art?!
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
piqs.de - Fotocommunity & lizenzfreie Fotos
Page created in 0.091 seconds with 19 queries.
Post your comments here