Gossamer Forum
Home : Products : Links 2.0 : Customization :

added the priority mod but <%if priority%> does not work.

Quote Reply
added the priority mod but <%if priority%> does not work.
The following two pieces of code work, but the third does not work.



<%if isNew%>
<small><sup class="new">new</sup></small>
<%endif%>

<%if isPopular%>
<small><sup class="pop">pop</sup></small>
<%endif%>

<%if priority%>
<small><center><b><font size="2" color="FF0000">*** Webmaster Preferred Site ***</font></b></center></small><BR>
<%endif%>



I would like to be able to add the above line to my listings so if I have already chosen a link to be a Priority Link the words WEBMASTER PREFERRED SITE will appear in the listing.

I have tried to use <%if priority%> and <%if Priority%> but neither of them work.

Can anyone help me with this?



Thank you in advance for your help.

tex
Quote Reply
Re: [tex] added the priority mod but <%if priority%> does not work. In reply to
I used the mode a few months ago but I did not like it because in Netscape 4.77 it displays an 'empty' box next to links which are not supposed to have the priority logo.

It looks nice and works fine in IE but reality is that a great deal of users still use Netscape.

It might be a way around this problem and hopefully someone in the forum will be able to help you out.

IcewaterWink
Quote Reply
Re: [IceWater] added the priority mod but <%if priority%> does not work. In reply to
This is certainly NOT a browser-related problem. With the mod properly installed, your image should be displayed in any browser. Wink
Quote Reply
Re: [tex] added the priority mod but <%if priority%> does not work. In reply to
What do you have defined in links.def for the priority mod? (i.e in the hash defined near the top of the file)

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [AndyNewby] added the priority mod but <%if priority%> does not work. In reply to
Dear Andy,

This is what I have defined in the links.def for the priority mod:

Priority => [17, 'alpha', 0, 5, 1, 'No', 'No|Yes']

The priority mod itself works, the problem is in the link.html file...

I have <%if isNew%> and <%if priority> to display when a link is new, and the second if it would work would show my visitors that I have specically selected this link as a link that I am recommending.

Is there some internal code that I need to tweak to make this happen?

Thanks in advance for your help.
Quote Reply
Re: [tex] added the priority mod but <%if priority%> does not work. In reply to
Firstly you'll need <%if Priority%> as fields are case sensitive, but also you can't use an if on its own as your field is yes/no so it will always be true. You'll need the enhanced template mod and use:

<%if Priority eq 'Yes'%>

Last edited by:

RedRum: Feb 18, 2002, 7:40 AM
Quote Reply
Re: [Tho:mas] added the priority mod but <%if priority%> does not work. In reply to
In Reply To:
This is certainly NOT a browser-related problem. With the mod properly installed, your image should be displayed in any browser.
Quote Reply
Re: [RedRum] added the priority mod but <%if priority%> does not work. In reply to
In Reply To:
Firstly you'll need <%if Priority%> as fields are case sensitive, but also you can't use an if on its own as your field is yes/no so it will always be true. You'll need the enhanced template mod and use:

<%if Priority eq 'Yes'%>


The above did not fix the problem. Is there a piece of code that sets a flag for <%if Priority%> or <% if isNew%>

I would think that they would both work the same way.

Please advise if you can.... Thanks again for your help.

TEX
Quote Reply
Re: [tex] added the priority mod but <%if priority%> does not work. In reply to
Do you have the following codes in sub site_html_link (site_html_templates.pl)?

($rec{'isPriority'} eq 'Yes') ? ($rec{'isPriority'} = 1) : (delete $rec{'isPriority'});
Post deleted by tex In reply to
Quote Reply
Re: [tex] added the priority mod but <%if priority%> does not work. In reply to
Do you have a question or comment, or even a point to that post?

--Philip
Links 2.0 moderator
Quote Reply
Re: [Tho:mas] added the priority mod but <%if priority%> does not work. In reply to
Thank you Tho:mas,

That solved the problem... You are the C Smile Smile Lest in my book.

TEX
Quote Reply
Re: [tex] added the priority mod but <%if priority%> does not work. In reply to
Well if you tell people the field name is "Priority" how are they supposed to give you an answer that works Smile
Quote Reply
Re: [RedRum] added the priority mod but <%if priority%> does not work. In reply to
SmileCan you please confirm that my problem with the mode was not a browser related problem. If not, what have I done wrong?Smile

Regards,



Icewater