Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Display global details on external pages?

Quote Reply
Display global details on external pages?
I have a 'Top 10' global in my LSQL sidebar and I would like to be able to display its output on my (none GT) forum sidebar.

Anyone have any ideas as to how to achieve this?

Thanks.
Quote Reply
Re: [MJB] Display global details on external pages? In reply to
Well, depends what forum it is you're using? If worst came to worst, I would make a new template called "show_top_10", then put that global call in it (and only that)

Then, have page.cgi?p=show_top_10 in an IFRAME on your forum, where you wanted it.

If it was perl, then I'd be able to suggest a better solution - but no point, as I don't know what you're using =)

Cheers

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: [Andy] Display global details on external pages? In reply to
It's UBBThreads and mainly uses PHP to call info to the sidebar.

I tried the additional template route but I think it needs to build the actual page with the info before I can call it with PHP.
Quote Reply
Re: [MJB] Display global details on external pages? In reply to
Ya, set it up in GLinks like I exlained, then try testing with http://www.domain.com/cgi-bin/page.cgi?p=show_top_10. If that works,then yuo can try and work out a PHP call to simply grab that page (not a user of PHP really, so afraid I can't explain how to do that)

Cheers

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: [Andy] Display global details on external pages? In reply to
No, it just returns an empty table which I thought it would. I'll have to try and work something else out.
Quote Reply
Re: [MJB] Display global details on external pages? In reply to
Whats the global? (and how are you calling it)

Cheers

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: [Andy] Display global details on external pages? In reply to
Code:
top10


sub {
my $tags = shift;
my $table = $DB->table('Links');
$table->select_options ('ORDER BY Hits DESC', 'LIMIT 10');
my $sth = $table->select;
my @output;
while (my $link = $sth->fetchrow_hashref) {
push (@output, $link);
}
return { top10_loop => \@output };
}

Calling it with:
Code:
<%top10%>
<%loop top10_loop%>
<%endloop%>
Quote Reply
Re: [MJB] Display global details on external pages? In reply to
Ok, why do you just have:
Code:
<%top10%>
<%loop top10_loop%>
<%endloop%>

?

You ened something like:

Code:
<%top10%>
<%loop top10_loop%>
<%include link.html%>
<%endloop%>

Cheers

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: [Andy] Display global details on external pages? In reply to
I don't want to include the link contents so I just have a list displayed. Here is a section of the table code that might explain things a little clearer:

Code:
<%top10%>
<%loop top10_loop%>
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td width="75%" class="leftalt-10" style="border-bottom: 1px solid #202020;">
<a href="<%config.db_cgi_url%>/jump.cgi?ID=<%ID%>" target="_blank"><%Title%></a>
</td>
<td align="right" class="leftalt-10" width="25%" style="border-bottom: 1px solid #202020;" valign="top"><%Hits%></td></tr>
<%endloop%>


You can see it on the left hand side here entitled Top Downloads. There is also a 'Totals' global at the bottom of that table.

I'm trying to get that table to display similarly on the left of the forum.
Quote Reply
Re: [MJB] Display global details on external pages? In reply to
Try adding this near the end, to see what it has:

<%DUMP top10_loop%>

Cheers

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: [Andy] Display global details on external pages? In reply to
That just lists the contents of the database tables with the complete info relating to each link.

Last edited by:

MJB: Apr 18, 2009, 4:33 AM
Quote Reply
Re: [MJB] Display global details on external pages? In reply to
Ok, well that means it down to that table code you have then. You need to check it over, and look at the actual outputted HTML on the page.cgi, to see whats happening.

Cheers

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: [Andy] Display global details on external pages? In reply to
Thanks Andy. Will do.

Smile