Gossamer Forum
Home : Products : Gossamer Links : Discussions :

<%if ...%> Qstn

Quote Reply
<%if ...%> Qstn
Hi.

This is wrt error while calling a global in following thread

http://www.gossamer-threads.com/...t;post=206933;page=2

I could get away with the same from following:

Adding A Review.

By using

<%ifnot add_review%><%review_graph%><%endif%>

How can i get the same removed from following also:

Reading A Review
Recommend It

From within the same <%ifnot.....%>

TIA
Anup
Quote Reply
Re: [anup123] <%if ...%> Qstn In reply to
hi anup

just pulled this out the help pages which might be of some use...

<%if age < 10 or age > 90 or status eq banned%>
You are not permitted to view this page.
<%endif%>

think it gives an example of what you're trying to do?

regan.
Quote Reply
Re: [ryel01] <%if ...%> Qstn In reply to
Hi.

yeah precisely. working with GM is pretty easy where conditional if could be built using page=xxxx;do=yyyyy etc. However, say i want a condition within that if which has to be wrt

review.cgi
recommend_it.cgi
contact.cgi

(which are the ones which are throwing error on the <%review_graph%> global ... so i would want the <%review_graph%> to be excluded from the resulting pages as a consequence of accessing the above cgi's)

What do i do?
I am sure i cannot use p=review_add.html etc as it gives tag error on the resulting pages. Hmmm lsql is sooo much tougher than GMail :/

Any clue?

TIA
Anup
Quote Reply
Re: [anup123] <%if ...%> Qstn In reply to
Hi,

You could just set a new variable on pages where you want to show the graph

<%set showgraph='Yes'%>

and then have <%if showgraph eq 'Yes'%><%review_graph%><%endif%>

or something similar.
Quote Reply
Re: [afinlr] <%if ...%> Qstn In reply to
Hi

Jus pm'd the example

TIA
Anup
Quote Reply
Re: [afinlr] <%if ...%> Qstn In reply to
Hi.

Issue resolved.

I can only have Links and Gmail under mod_perl with Links Loaded first (Lsql2.1.2+GM2.2.0).

If i do the opposite going by the fact that GM2.2.0 (Oct 25, 2003) was released later than links 2.1.2 (Jan4, 2003) and load GM first, then the error creeps up on links site.

Thanks for support.

Anup

Last edited by:

anup123: Jun 30, 2004, 4:22 PM
Quote Reply
Re: [anup123] <%if ...%> Qstn In reply to
Just for added info, in case anyone from GT wants to investigate this, the relevant threads are:
http://www.gossamer-threads.com/...i?post=265014#265014
and
http://www.gossamer-threads.com/...i?post=260888#260888
Quote Reply
Re: [afinlr] <%if ...%> Qstn In reply to
Hi,

BTW as trial, i just tried symlinked GT (GT of GF) in Links and upon restarting, the same error crept up again. So switched back toi GT of Links...

If i load GF above Links, the error creeps up.
If i load below Links then the following error is there during httpd startup:

Use of uninitialized value in substitution (s///) at /path/to/links/admin/GT/AutoLoader.pm line 127.
Use of uninitialized value in concatenation (.) or string at /path/to/links/admin/GT/AutoLoader.pm line 128.


Anup
Quote Reply
Re: [afinlr] <%if ...%> Qstn In reply to
Hi GT Staff.

Conducted following tests wrt failure of globals etc in LinksSQL (which has been observed by me and also reported frequently by others) when multiple GT products are used under mod_perl

Common Parameters:

Server Setup:
(1) Apache/1.3.31 (Unix) mod_gzip/1.3.26.1a mod_jk/1.2.0 mod_perl/1.29 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.3.6 FrontPage/5.0.2.2634a mod_ssl/2.8.18 OpenSSL/0.9.7a PHP-CGI/0.1b

It's a standard cPanel setup with mod_perl and mod_gzip built is DSO.

(2) Removed All Other GT Products from under mod_perl
(3) No other programs under mod_perl
(3) No Symlinking was done. Individually used the GT libraries of different GT products in three tests as noted below:

Basis: Extension of the fact that GT libraries could be symlinked to latest GT libraries. However, instead of symlinking, LinksSQL was tested with GT of GMail (2.2.0) and GF (1.2.2)

Test 1:

GT of Links2.1.2 used and httpd started with LinksSQL under mod_perl

Result1:
  1. httpd started without errors.
  2. Nothing failed (globals/plugins etc). Everything showed up fine.

Test 2:
mv GT GT.Links
mv GT.Gmail GT
restart httpd again with LinksSQL under mod_perl

Result2:
  1. httpd started fine
  2. errors wrt <%rewrite_url%> <%review_graph%> whenever the same was on any page with cgi extension

Test 3:
mv GT GT.GMail
mv GT.GF GT
restart httpd again with only LinksSQL under mod_perl

Result3:
  1. httpd restarted fine
  2. errors wrt <%rewrite_url%> <%review_graph%> whenver the same was accessed on any page with .cgi extension

After doing the above tests have reverted back to Only GMail under mod_perl as i did not want anything on GMail to fail because of any reason. Links has been moved out of mod_perl

Questions: If higher version of GT libraries have backward compatibility and can be used interchgangeably then:

Why is GT of GMail and GF causing the errors when used with LinksSQL?

LinksSQl errors have often been reported with Multiple GT products under mod_perl. Server setup is a standard cPanel installation with mod_perl and mod_gzip built in as DSO.

Is this a Bug? How could this be taken care of more generically as cPanel setup is quite popular.

Hope the solution would be there.

TIA
Anup
Quote Reply
Re: [anup123] <%if ...%> Qstn In reply to
Hi.

Any clue?
I am clueless so far. So i have moved Links out of mod_perl :/

Thanks
Anup
Quote Reply
Re: [anup123] <%if ...%> Qstn In reply to
I get a feeling i am talking to myself :/

Anup
Quote Reply
Re: [anup123] <%if ...%> Qstn In reply to
Hi.

No Clue So Far. The <%review_graph%> global fails to show up as desired when LinksSQL is under mod_perl in combination with GM under mod_perl but shows up fine when Only LinksSQL under mod_perl (with GT libraries of LinksSQL), but again fails with latest GT Libraries of other products (say GM2.2.0 and Links 2.1.2).

Where exactly could the problem be? Currently have pulled LinksSQL off from under mod_perl.

TIA
Anup
Quote Reply
Re: [anup123] <%if ...%> Qstn In reply to
Hi Anup,

I think that you need to upgrade to LinksSQL 2.2.0 - I think that the previous version is not compatible with the new libraries (I'm sure that I've read that recently from GT).

Laura.
Quote Reply
Re: [afinlr] <%if ...%> Qstn In reply to
Hi Laura.

I would do the same and see if that corrects the discrepancies. Upgrades are slightly involved job as i would not want to break if anything else in 2.1.2 falls in the "Non Supported" class wrt New GT Libraries.

Thanks for response.

Anup