Posted on: 08/06/03 11:13pm
By: Euan
I\'m sure this is in the forums somewhere, but I didn\'t see/couldn\'t find this, so I\'ll post it here although it\'s too simple to be called a hack. It took all of 1 minute.
If you have lots of links, the admin page is not very easy to use. To add a convenient \"edit\" link to your links in the normal categories, for admins only:
In layout/theme_name/links/linkdetails.thtml, add { link_edit } before the < br > command. You should have this:
< li >
< a href=\"{link_url}\" > {link_name} < /a > ( {link_hits} ) {link_edit} < br >
{link_description}
< /li >
In public_html/links.php, around line 138 ish and again at about 180, add the following 3 lines just before $linklist->parse(\'link_details\', \'link\', true); (that line is included for reference):
if (SEC_hasRights(\'link.edit\')) {
$linklist->set_var(\'link_edit\', \'< a href=\"\' . $_CONF[\'site_admin_url\'] . \'/link.php?mode=edit&lid=\' . $A[\'lid\'] . \'\">\' . $LANG01[4] . \'< /a >\');
}
$linklist->parse(\'link_details\', \'link\', true);
Euan.
Re:Links edit link hack
Posted on: 08/07/03 04:12am
By: Dirk
Nice one. I\'ll note that down for future addition to the core code. Thanks.
bye, Dirk
Re:Links edit link hack
Posted on: 08/07/03 12:37pm
By: Euan
Always glad to be of help!
Cheers
Re:Links edit link hack
Posted on: 08/22/03 10:15am
By: Anonymous (Paul)
Euan,
This displays the full html code string rather than just the word \'edit\' at the end of each link line.
Any ideas?
I am using GL v1.3.8
Thx, Paul
Re:Links edit link hack
Posted on: 08/22/03 11:50am
By: ronack
remove the extra space between < a hre....>and the ones between
< /a
and between
/a >
Re:Links edit link hack
Posted on: 08/22/03 11:50pm
By: cenithx
Awesome hack.. thanks
certainly makes life easier.