Gossamer Forum
Home : Products : Gossamer Links : Discussions :

What gets passed to Links::Link::HTML::display()?

Quote Reply
What gets passed to Links::Link::HTML::display()?
I'm trying to display a bunch of links in the admin view. I have their ids, and I can fetch the record in to a hash, but when I try to run the hash in to Links::Link::HTML::display() I get an unblessed reference error. Any thoughts?

Here's the code I'm running...(within a larger sub)

Code:
foreach my $id (@ids) {
my $rec = $linkdb->get ($id);
$results .= Links::Link::HTML::display ( { mode => 'search_results', values => $rec });
}

Here's the error:

Code:

Can't call method "_plg_display" on unblessed reference at /var/www/clients.kbpwest.com/cisco/content_dev/admin/Links/Link.pm line 413.

Please enable debugging in setup for more details.

Stack Trace
======================================
Links (5405): Links::environment called at /var/www/clients.kbpwest.com/cisco/content_dev/admin/Links.pm line 430 with no arguments.
Links (5405): Links::fatal called at /var/www/clients.kbpwest.com/cisco/content_dev/admin/Links/Link.pm line 413 with arguments
    (Can't call method "_plg_display" on unblessed reference at /var/www/clients.kbpwest.com/cisco/content_dev/admin/Links/Link.pm line 413.
        ).
Links (5405): Links::Link::HTML::__ANON__ called at /var/www/clients.kbpwest.com/cisco/content_dev/admin/GT/Plugins.pm line 103 with arguments
    (HASH(0x848e80c)).
Links (5405): GT::Plugins::dispatch called at /var/www/clients.kbpwest.com/cisco/content_dev/admin/Links/Link.pm line 413 with arguments
    (GT::Plugins, /var/www/clients.kbpwest.com/cisco/content_dev/admin/Plugins, display_link, CODE(0x848e83c), HASH(0x848e80c)).
Links (5405): Links::Link::HTML::display called at /var/www/clients.kbpwest.com/cisco/content_dev/admin/Plugins/search_verts.pm line 67 with arguments
    (HASH(0x848d29c)).
Links (5405): Plugins::search_verts::print_form called at /var/www/clients.kbpwest.com/cisco/content_dev/admin/admin.cgi line 216 with no arguments.
Links (5405): main::plugin called at /var/www/clients.kbpwest.com/cisco/content_dev/admin/admin.cgi line 52 with no arguments.
Links (5405): main::main called at /var/www/clients.kbpwest.com/cisco/content_dev/admin/admin.cgi line 24 with no arguments.

Thanks!
Mike

Last edited by:

Swaylock: Mar 3, 2004, 1:36 PM
Quote Reply
Re: [Swaylock] What gets passed to Links::Link::HTML::display()? In reply to
Why not use Links::SiteHTML?

Code:
$results .= Links::SiteHTML::display('template', $rec);

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] What gets passed to Links::Link::HTML::display()? In reply to
Andy,

That fixed it. Thanks.

Still curious to know how to get it working for Links::Link::HTML. Or at least why I'm getting the unblessed reference error.

Much thanks again!

Mike
Quote Reply
Re: [Swaylock] What gets passed to Links::Link::HTML::display()? In reply to
Glad to hear it. I've always used Links::SiteHTML::display(), so I'm afraid I don't know why you are getting that error.

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: [Swaylock] What gets passed to Links::Link::HTML::display()? In reply to
Oh actually,

One last question seeing as I have you here (hopefully) and seeing as you are such a plugin expert.

When you create a plugin, and you add a link to the admin control panel, the link by default comes up in the plugins panel (on the left side).

Is there any easy way to customize which panel I can put that link into? Say I wanted the link to appear under database view for example?

Thanks,
Mike
Quote Reply
Re: [Swaylock] What gets passed to Links::Link::HTML::display()? In reply to
I'm not sure. AFAIK its done by the order that you set them up, i.e if you have the following setup in Install.pm;

test
foo
bar

... then on the left, it would show up as;

Plugin_Name
test
foo
bar

I'm only guessing about this though, as I've never really bothered to look into 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] What gets passed to Links::Link::HTML::display()? In reply to
Andy,

I think I phrased my question incorrectly. Without major hacking, can you get the custom plugin link to apprear in a NON-plugin control panel? Specifically I'd like the link to apear in Database > Tools.

Thanks again for all your help,
Mike
Quote Reply
Re: [Swaylock] What gets passed to Links::Link::HTML::display()? In reply to
Ah, in that case, I doubt you would be able to do it without editing the admin templates, and linking to the plugins area (for your particular plugin), with something like;

admin.cgi?do=plugin&plugin=Plugin_Name&func=My_Function

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!