Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Easy way of doing this --glinks 3?

Quote Reply
Easy way of doing this --glinks 3?
I would want that the contents of righthandsidebar are varying depending upn the body id or something recognizable using if then endif.

For example i would want only home page to have latest_n listings (global available) and the category page to have latest_n listings only from that category downwards (again global available). Is there an easy way of doing this? Template Set : luna Glinks 3

This is important as still the sidebar and content area balancing is posing limitations.

TIA

Thanks
HyTC
==================================
Mail Me If Contacting Privately Is That Necessary.
==================================
Quote Reply
Re: [HyperTherm] Easy way of doing this --glinks 3? In reply to
Actually, I committed something like that to cvs this morning. I'll add an update to the update system in a bit. It'll give you a <%page_id%> variable, which will be the original page (minus the extension) that was passed into Links::user_page (so, this will be home, category, search, etc).

Adrian
Quote Reply
Re: [HyperTherm] Easy way of doing this --glinks 3? In reply to
OK think i got it going but not yet sorted out. So posting for help here:

<%set pageid = somepagename%> put at top of the home and category.html
then in the rightsidebar could get things going for displaying only on home page by:

<%if pageid eq 'homepage'%>
<%latest_ten_additions%>
<%endif%>

This works fine with content included only for homepage sidebar. However, following global doesn't print out anything for the category page

<%if pageid eq 'catpage'>
<%latest_ten_cat%>
<%endif%>

and here is the global:

sub {
my $tags=shift;
my $back;
my $cat_id = $tags->{ID};
my $all_ids = $DB->table('Category')->children($cat_id);
push @$all_ids,$cat_id;
my $link_db = $DB->table('Links','CatLinks');
$link_db->select_options('ORDER BY Add_Date DESC','LIMIT 10');
my $condition = GT::SQL::Condition->new( 'isValidated','=','Yes','CategoryID', 'IN', $all_ids);
my $sth = $link_db->select($condition);
while (my $link = $sth->fetchrow_hashref) {
$back .= Links::SiteHTML::display('newlink_cat',$link);
}

return $back;
}

Upon upgrading following things have happened:

The above global has stopped working even on live site (upgrade done on live site)
The Days_old plugin has stopped working
The Glinks3 Home page also doesn't display the "New" status thought the categories underneath show the same.

Any clue....

TIA

Thanks
HyTC
==================================
Mail Me If Contacting Privately Is That Necessary.
==================================
Quote Reply
Re: [brewt] Easy way of doing this --glinks 3? In reply to
I think update to live site has done something haywire... not to worry but i am still trying to get it going. Certain parts stopped working (globals, new status etc). I tried a reupdate and this is what i get:

Performing Links SQL 2.2.0 -> 2.2.1 upgrades...
Updating column definition for Rating in Links table...
none
A fatal error has occured:
GT::SQL::Editor (3814): Unknown method '_column_sql' called at GT::SQL::Editor::alter_col line 238.

Please enable debugging in setup for more details.

Any clue

TIA


Thanks
HyTC
==================================
Mail Me If Contacting Privately Is That Necessary.
==================================
Quote Reply
Re: [HyperTherm] Easy way of doing this --glinks 3? In reply to
OK i am back to 2.2.0 as it's daytime for us here. Would be attempting again an upgrade tonight my time and come back with observations in continuation to this.

Adrian thanks for adding that feature... which would make it easier than setting pageid == ..... manually for each page for the objective desired.

Thanks

Thanks
HyTC
==================================
Mail Me If Contacting Privately Is That Necessary.
==================================
Quote Reply
Re: [brewt] Easy way of doing this --glinks 3? In reply to
Okay, the update for this is up.

Adrian
Quote Reply
Re: [brewt] Easy way of doing this --glinks 3? In reply to
Perfect! Tested on test install. (which wasn't a replica of live install though). Would take it up on live install upgrade tonight my time and get back on the same.

Saves a lot of hassle :)

Thanks

Thanks
HyTC
==================================
Mail Me If Contacting Privately Is That Necessary.
==================================
Quote Reply
Re: [brewt] Easy way of doing this --glinks 3? In reply to
Can the content area height be adjusted to almost the same as the rhs/lhsbars? If yes what has to be edited? I tried content and contentwrapper but couldn't succeed.

TIA

Thanks
HyTC
==================================
Mail Me If Contacting Privately Is That Necessary.
==================================
Quote Reply
Re: [HyperTherm] Easy way of doing this --glinks 3? In reply to
Well, you can, but you have to work around some browser bugs here. See this article on how to do something like that (essentially you're wanting to set a min-height on #content).

Adrian
Quote Reply
Re: [brewt] Easy way of doing this --glinks 3? In reply to
Thanks.
Since priority would be to get things up and ready real quick, i have bookmarked that link. However, i wouldn't be able to do any upgrades test till GT releases the RC as installation deleted the install.cgi/install.dat and the daily remote backup also got updated with current contents so i have no real RC version to upgrade the live install with :/

Thanks
HyTC
==================================
Mail Me If Contacting Privately Is That Necessary.
==================================