• Page 1 of 1
  • 1
Conditional operators not working
Remember
Posts: 93
Reputation: 1

Message # 1 | 11:46 PM
In the full text of entry (on blog module) if I use these codes
Code
<?if($GROUP_ID$=2 or $GROUP_ID$=4)?><a href="random_link" target="_blank"><img src="http://www.trifanpaul.com/Download/2/vip.png" border="0" alt="TrifanPaul.com"></a><?endif?>   

<?if($GROUP_ID$=1)?>
<a href="http://www.trifanpaul.com/index/0-108"><img src="http://www.trifanpaul.com/Download/2/novip.png" border="0" alt="TrifanPaul.com"></a></a></a> <?endif?>   


group 2 or 4 can see what is just for group 1 and group 1 can se what should be seen just by group 2 and 4

these codes are working on a page, but here it seems they do not, what could be the problem?

Post edited by Remember - Wednesday, 2011-08-03, 11:46 PM
redhead
Posts: 113
Reputation: 9

Message # 2 | 9:04 AM
Remember, Your codes work on full entry page on blog module.

Quote (Remember)
these codes are working on a page, but here it seems they do not

What do you mean?
Post edited by redhead - Thursday, 2011-08-04, 9:05 AM
lilu
Posts: 70
Reputation: 6

Message # 3 | 9:56 AM
Remember,
give me please the link to such an entry
Remember
Posts: 93
Reputation: 1

Message # 4 | 10:39 AM
Redhead, they work but for example, group 1 = members . group 2 = checked and group 4 = administrators (me).

If i insert those codes, every group can see those codes, even if they are checked or not, even if they are members or not.

Lilu, even if I give you the link, you can't see it because I use the "hide" code to hide download links from my guests.

Quote
What do you mean?


I mean that on page editor if I create a new page and I insert the codes there, they are working properly, but in "full description" of blog module they are not working, like I said earlier sad

lilu
Posts: 70
Reputation: 6

Message # 5 | 11:34 AM
Remember, give us please the link. We will see it wink
Remember
Posts: 93
Reputation: 1

Message # 6 | 12:34 PM
lilu
Posts: 70
Reputation: 6

Message # 7 | 2:44 PM
Remember, you put the code in the text of entry. But you should put it to the template.
Do as follows:
-activate the additional fields by adding an entry (for example, field 1 - and put the first link, field 2 - the second)
-edit the template "Page with entry full text and its comments": put there your conditional operator (for example, if it is group 1 - show the content of the field 1)

Here is an example of the code:
Code
<?if($GROUP_ID$='2' or $GROUP_ID$='4')?><a href="$OTHER1$" target="_blank"><img src="http://www.trifanpaul.com/Download/2/vip.png" border="0" alt="TrifanPaul.com"></a><?endif?>
<?if($GROUP_ID$='1')?><a href="$OTHER2$"><img src="http://www.trifanpaul.com/Download/2/novip.png" border="0" alt="TrifanPaul.com"></a><?endif?>


Hope it helps smile
Post edited by lilu - Thursday, 2011-08-04, 2:45 PM
Remember
Posts: 93
Reputation: 1

Message # 8 | 3:08 PM
Lilu, thanks a lot, you're a life saver :D. The only problem left would be that the button appears on the top of the trailer, and not under the other links, and that is the best solution yet because if I insert the codes lower on the template page, the button goes under the comment section... could there be a solution to this problem too?

//sorry for my bad english

lilu
Posts: 70
Reputation: 6

Message # 9 | 3:17 PM
Remember, tell me please, to what template have you inserted the code?
Remember
Posts: 93
Reputation: 1

Message # 10 | 6:07 PM
Blog / Page with entry full text and its comments
lilu
Posts: 70
Reputation: 6

Message # 11 | 8:40 AM
Remember, insert the code under:

Code
<tr><td class="eMessage">$MESSAGE$ <?if($ATTACHMENTS$)?><div style="text-align: left;" class="eAttach"><!--<s3172>-->Atasamente<!--</s>-->: $ATTACHMENTS$</div><?endif?></td></tr>


Hope it is what you need smile
Remember
Posts: 93
Reputation: 1

Message # 12 | 11:34 AM
I inserted, but the image appears in the same place :))
lilu
Posts: 70
Reputation: 6

Message # 13 | 2:29 PM
Remember,
now everything should be ok. check please smile
Remember
Posts: 93
Reputation: 1

Message # 14 | 2:40 PM
Now it's ok, thank you very much for your help biggrin
  • Page 1 of 1
  • 1
Search: