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

Editing <%category%> tag in include_form.html?

Quote Reply
Editing <%category%> tag in include_form.html?
I've been playing around, trying to add some 'style' tags to the <%Category%> tag....so far, I've narrowed it down to this sub routine in /admin/Links/Users/Add.pm;

Code:
sub _category_list {
# -------------------------------------------------------------------
# Return a list of all the categories.
#
my $category;
if ($CFG->{db_gen_category_list}) {
my $db = $DB->table('Links');
my $html = $DB->html($db, $IN);
my @ids = $IN->param('CatLinks.CategoryID') || $IN->param('ID');
$category = $html->get_all_categories(\@ids, 'CatLinks.CategoryID', 1);
$category =~ s,<SELECT name=CatLinks.CategoryID>,<SELECT name=CatLinks.CategoryID style='border: 1px solid #000080; background-color: #C0C0C0'>,;
}
else {
my $db = $DB->table('Category');
my $id = $IN->param('CatLinks.CategoryID') || $IN->param('ID');
my $sth = $db->select ( { ID => $id }, ['Full_Name'] );
my ($name) = $sth->fetchrow_array();
if ($name) {
$category = "$name <input type=hidden name='CatLinks.CategoryID' value='$id' style='border: 1px solid #000080; background-color: #C0C0C0'>";
}
else {
return;
}
}
return $category;
}

The parts in red I have added....but they still don't seem to be showing up in add.cgi Unsure

Any help is much appreciated.

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!

Last edited by:

Andy: Feb 22, 2003, 4:15 AM
Quote Reply
Re: [Andy] Editing <%category%> tag in include_form.html? In reply to
Most likely your regex is failing. Try just replacing $category to see if you are indeed in the right place.

Cheers,

Alex
--
Gossamer Threads Inc.