Tagless Links

0 views
Skip to first unread message

Sam Collett

unread,
Feb 6, 2009, 6:12:26 AM2/6/09
to Pixie
I have made a modification to the 'pixie_module_links' table to allow
the 'tags' field to be optional (by allowing NULL values). A link can
now be added without a tag. However, when viewing on the public links
page, it does not show. This can be fixed through editing admin/
modules/links.php

Go to line 159. Under the 'echo' (should contain $page_display_name)
paste in the following:

// tagless links first
$rz = safe_rows("*", "pixie_module_links", "tags = ''");
$num = count($rz);
if ($rz) {
echo "\t\t\t\t\t<div id=\"$current\" class=\"link_list\"><ul>\n";
$i = 0;
while ($i < $num){
$out = $rz[$i];
$url = $out['url'];
$link_title = $out['link_title'];
echo "\t\t\t\t\t\t\t<li><a href=\"$url\" title=\"$link_title\">
$link_title</a></li>\n";
$i++;
}
echo "\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</div>\n";
}

Now links without a tag will be shown above those with one

Scott

unread,
Feb 8, 2009, 7:58:46 AM2/8/09
to Pixie
Thanks for posting this up, should be very useful for others!

Scott

Reply all
Reply to author
Forward
0 new messages