|
uCoz Community Archives Locked Conditional operators not working |
Conditional operators not working |
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, 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 |
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 Post edited by lilu - Thursday, 2011-08-04, 2:45 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 |
| |||
| |||