Gossamer Forum
Home : Products : Links 2.0 : Customization :

Update: New nested if mod.

Quote Reply
Update: New nested if mod.
I updated the nested if mod to work properly with the ifnot tags. While working on it, I also removed the restriction that <%if ..%> tags have to be on their own line. You can now do:

<%if links%> foo <%endif%> <%if category%> fum <%endif%>

all on one line and it should parse correctly.

This should also fix the problems people were having with the nested if mod and the resource section templates. You can get the mod here:

http://www.gossamer-threads.com/...ces/Detailed/26.html

Cheers,

Alex

[This message has been edited by Alex (edited June 01, 1999).]
Quote Reply
Re: Update: New nested if mod. In reply to
I know this is a bit off the point, but nice to hear from you Alex in a while. Can't remember seeing a post from your goodself in quite a while.

That rewrite of the nested mod must have given you some work ;-)

Martin
Quote Reply
Re: Update: New nested if mod. In reply to
Hi Alex,

I have uploaded the new "Template Nested 'ifs' Mod" .
I then tried to build all and everything worked. It used to fail with the old "Template Nested 'ifs' Mod"
I then uploaded the templates of Script Resource Center Templates but then the build all doesn't work anymore. I know you were looking for test sites so I sent you my FTP info via email.

Here is what I got in my admin control panel when I tried to build all


Building Home Pages
. . . Subcategories: 4 Total Links: 2 Opening page:
/usr/home/happyrob/public_html/free-email-directory/index.html
CGI ERROR
==========================================
Error Message : fatal error: Compilation failed in require at /usr/home/happyrob/public_html/cgi-bin/links/admin/db_utils.pl line 503.

Script Location : /usr/home/happyrob/public_html/cgi-bin/links/admin/nph-build.cgi
Perl Version : 5.00502


Thanks for your help.
Quote Reply
Re: Update: New nested if mod. In reply to
Oops, I lost something in the HTML translation. It's now fixed up.

As for my whereabouts, I've been trying to spend some time on the forum, just not as much as I would like. =)

Cheers,

Alex
Quote Reply
Re: Update: New nested if mod. In reply to
NEW 'ifs' mod DOES WORK!

Alex,

You're a saviour, thank you so much for all
of your help sorting out the problems I was having, after spending so long designing the search engine I can finally add the finishing touches and get on with the launch, I can see light now at the end of the tunnel!

Thanks again

-Gary
Quote Reply
Re: Update: New nested if mod. In reply to
After adding fixed mod the include command no longer shows the header or footer any clues. I removed the old code and replaced it with the new code.

<%include header.txt%>

<%include footer.txt%>

Anybody else seen this, Im using Templates, well I guess you know that...

Smile
Quote Reply
Re: Update: New nested if mod. In reply to
My Headers and footers are also not displaying on the category pages with the fix.
Quote Reply
Re: Update: New nested if mod. In reply to
Hmm... now the ifnot tag works but include doesn't. 3 links users here facing the same problem. Alex? Bobsie? Is the bug being crushed?
Quote Reply
Re: Update: New nested if mod. In reply to
If anyone is having any problems with the code posted on any HTML pages either here at this site or anywhere else, here is a URL to download an updated Template.pm that Alex himself configured for me - which appears to work. I can't say I've tested any code posted anywhere else. I can only tell you that this works for me! - Good Luck and let me know how you get on if you use it.

gary.cheers@virgin.net
DOWNLOAD: http://www.man-united.net/Template.pm
Quote Reply
Re: Update: New nested if mod. In reply to
Cheers,

The Template.pm file you have does not include the nested if's mod or the <%ifnot ...%> mod, so it wouldn't be much use on this problem.

The Template.pm they are referring to in this thread was also done by Alex, just a few days ago (it is a fix to someone else's mod though).

[This message has been edited by Bobsie (edited June 05, 1999).]
Quote Reply
Re: Update: New nested if mod. In reply to
It's all fixed up again. I missed another set of < and > tags so that the cut and paste caused an error. Ack.

Cheers,

Alex
Quote Reply
Re: Update: New nested if mod. In reply to
Alex - we *love* you! Smile

This is the fix I've been waiting for, and it is working great here in HK.

-Spode
Quote Reply
Re: Update: New nested if mod. In reply to
Everything is working fine now with the Links Resource template. THANKS TO YOU ALEX!

I have only one minor problem with the footer/header files.

Did anyone take the time to update those 2 file to replace the links og the menu bar with the appropriate variables like in the original Links templates?
(ie. <a class="menulink" href="<%db_cgi_url%>/modify.cgi"> instead of <a href="/scripts/resources/modify.cgi"> )

I think it would be great to update the footer/header files of this great template set. I'm just not anything close to a programer...
Quote Reply
Re: Update: New nested if mod. In reply to
Alex,

I copied your nested mod and pasted into the script. Building the script gave me a similar error as the others.

I tried gary's ar http://www.man-united.net/Template.pm and it worked fine.

Lance Rasmussen
http://www.bowlingzone.com

Quote Reply
Re: Update: New nested if mod. In reply to
Apparently this was resolved. See thread http://www.gossamer-threads.com/...um3/HTML/001992.html
Quote Reply
Re: Update: New nested if mod. In reply to
Something is screwy here. Alex says that the Template.pm posted on the mod is correct, yet some of us are still (6/29) having to revert to the other version to get the nested if include to work. See thread http://www.gossamer-threads.com/...um3/HTML/002015.html
I am using .shtml extensions --but other than that, I can't see why some of us might be having problems and others are not.

Bob
Quote Reply
Re: Update: New nested if mod. In reply to
Alex,
This from DiscImage in thread www.gossamer-threads.com/scripts/forum/resources/Forum3/HTML/002015.html
Quote:

I figured this one out a couple of days ago. Alex's doesn't work, man-united does except for one typo which does not seem to affect it.

Change Alex's from

$self->{'inc'}{$1} = join ("", );

To

$self->{'inc'}{$1} = join ("", <INC> );

and that's all I did. Both includes and the if endif being on same line work which has been a lifesaver.

I made the change (6/29), and Alex's Template.pm works for me.

[This message has been edited by bjordan (edited June 29, 1999).]