PDA

View Full Version : Links main page: don't show latest link, latest reply, links count, reply count


larina
09-13-2008, 10:47 PM
If you want your links directory main page not show the columns for latest link, latest reply, links count, reply count, you can simply do this by editing two templates:
ADV_LINKS
adv_links_categorybit_level2

The new code for ADV_LINKS is:


$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>$vba_options[links_title]</title>
$headinclude

<script type="text/javascript">
<!--
var VBA_LINKS_HOMEURL = '$vba_options[links_homeurl]';
-->
</script>
<script type="text/javascript" src="clientscript/vba_links_global.js?v=$vba_options[links_simpleversion]"></script>

</head>
<body>

$header

$navbar

$linksnav

<if condition="$show['subdirs']">
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat" width="100%">$vbphrase[sub_categories]: $navinfo[title]</td>

<if condition="$show['searchlinks']">
<td class="vbmenu_control" id="dirsearch"><a href="search.php?$session[sessionurl]catid=$catid" rel="nofollow">$vbphrase[search_this_category]</a> <script type="text/javascript"> vbmenu_register("dirsearch"); </script></td>
</if>
</tr>
</table>

<div class="vbmenu_popup" id="dirsearch_menu" style="display:none">
<form action="search.php" method="post">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="do" value="searchresults" />
<input type="hidden" name="quicksearch" value="1" />
<input type="hidden" name="catids[]" value="$catid" />
<table border="0" cellpadding="4" cellspacing="1">
<tr>
<td class="thead">$vbphrase[search_this_category]</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<input class="bginput" name="string" size="20" type="text" tabindex="1003" /> $gobutton</td>
</tr>
<tr>
<td class="vbmenu_option"><a href="search.php?$session[sessionurl]catid=$catid" rel="nofollow">$vbphrase[advanced_search]</a></td>
</tr>
</table>
</form>
</div>

</if>

<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<thead>
<tr>
<td class="thead" width="4%">&nbsp;</td>
<td align="$stylevar[left]" class="thead" width="100%">$vbphrase[category_description]</td>


</tr>
</thead>
$categorybits
</tbody>
</table>
<br />

<if condition="$show['stats']">
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<thead>
<tr>
<td class="tcat" colspan="2"><a href="#top" onclick="return toggle_collapse('links_statistics')" style="float:right"><img alt="" border="0" id="collapseimg_links_statistics" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_links_statistics].gif" /></a><phrase 1="$vba_options[links_title]">$vbphrase[x_statistics]</phrase></td>
</tr>
</thead>
<tbody id="collapseobj_links_statistics" style="$vbcollapse[collapseobj_links_statistics]">
<tr>
<td class="alt2"><img alt="<phrase 1="$vba_options[links_title]">$vbphrase[x_statistics]</phrase>" src="$stylevar[imgdir_misc]/stats.gif" /></td>
<td class="alt1" width="100%">$vbphrase[categories]: $stats[categories], $vbphrase[links]: $stats[links], $vbphrase[posts]: $stats[posts], $vbphrase[total_views] $stats[views]</td>
</tr>
</tbody>
</table>
<br />
</if>

<if condition="$show['newlinks']">
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<thead>
<tr>
<td class="tcat" colspan="7"><a href="#top" onclick="return toggle_collapse('newlinks')" style="float:right"><img alt="" border="0" id="collapseimg_newlinks" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_newlinks].gif" /></a><phrase 1="$vba_options[links_newonhome]">$vbphrase[newest_x_links]</phrase></td>
</tr>
</thead>
<tbody id="collapseobj_newlinks" style="$vbcollapse[collapseobj_newlinks]">
<tr>
<if condition="$show['link_statusicons'] OR $vba_options['links_thumbshots']">
<td class="thead" width="2%"<if condition="$show['link_statusicons'] AND $vba_options['links_thumbshots']"> colspan="2"</if>>&nbsp;</td>
</if>
<td align="$stylevar[left]" class="thead"><span style="float:$stylevar[right]">$vbphrase[rating]
</span>$vbphrase[link_name_description]</td>

<td align="center" class="thead" nowrap="nowrap" width="15%">
<if condition="$vba_options['links_allowreplies']">
$vbphrase[last_reply]
<else />
$vbphrase[last_updated]
</if>
</td>

<if condition="$vba_options['links_allowreplies']">
<td align="center" class="thead" nowrap="nowrap" width="5%">$vbphrase[replies]</td>
</if>

<td align="center" class="thead" nowrap="nowrap" width="5%">$vbphrase[views]</td>

<td align="center" class="thead" nowrap="nowrap" width="15%">$vbphrase[category]</td>

</tr>

$newlinkbits
</tbody>
</table>
<br />
</if>

<if condition="$show['randomlinks']">
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<thead>
<tr>
<td class="tcat" colspan="7"><a href="#top" onclick="return toggle_collapse('randlinks')" style="float:right"><img alt="" border="0" id="collapseimg_randlinks" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_randlinks].gif" /></a>$vbphrase[random_links]</td>
</tr>
</thead>
<tbody id="collapseobj_randlinks" style="$vbcollapse[collapseobj_randlinks]">
<tr>
<if condition="$show['link_statusicons'] OR $vba_options['links_thumbshots']">
<td class="thead" width="2%"<if condition="$show['link_statusicons'] AND $vba_options['links_thumbshots']"> colspan="2"</if>>&nbsp;</td>
</if>
<td align="$stylevar[left]" class="thead"><span style="float:$stylevar[right]">$vbphrase[rating]</span>$vbphrase[link_name_description]</td>

<td align="center" class="thead" nowrap="nowrap" width="15%">
<if condition="$vba_options['links_allowreplies']">
$vbphrase[last_reply]
<else />
$vbphrase[last_updated]
</if>
</td>

<if condition="$vba_options['links_allowreplies']">
<td align="center" class="thead" nowrap="nowrap" width="5%">$vbphrase[replies]</td>
</if>

<td align="center" class="thead" nowrap="nowrap" width="5%">$vbphrase[views]</td>

<td align="center" class="thead" nowrap="nowrap" width="15%">$vbphrase[category]</td>

</tr>

$randomlinkbits
</tbody>
</table>
<br />
</if>

$show[linkbit_dropdowns]

<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td width="100%">
<table cellpadding="2" cellspacing="0" width="100%">
<tr valign="bottom">
<td align="left" class="smallfont"><img alt="" class="inlineimg" src="$stylevar[imgdir_statusicon]/forum_new.gif" title="$vbphrase[category_contains_new_links]" /> $vbphrase[category_contains_new_links]</td>
</tr>
<tr>
<td class="smallfont"><img alt="" class="inlineimg" src="$stylevar[imgdir_statusicon]/forum_old.gif" title="$vbphrase[category_contains_no_new_links]" /> $vbphrase[category_contains_no_new_links]</td>
</tr>
</table>
</td>
<td>$categoryjump</td>
</tr>
</table>

$footer
</body>
</html>


The new code for adv_links_categorybit_level2 is:


<if condition="$show['tbody_start']">
<tbody>
</if>
<tr>
<if condition="$vba_options['links_showonoff']">
<td class="alt2" valign="top"><img alt="" border="0" src="$stylevar[imgdir_statusicon]/forum_$onoff.gif" /></td>
</if>
<td class="alt1">
<if condition="$cats['caticon']">
<img src="images/caticon/$cats[caticon]" alt="" align="$stylevar[left]" class="inlineimg" style="padding-$stylevar[right]: $stylevar[cellpadding]px" />
</if>
<strong><a href="$cats[caturl]">$cats[title]</a></strong>
<div class="smallfont">
<if condition="$vba_options['links_showcatowner'] AND $cats['catuserid']">
(<a href="$vboptions[bburl]/member.php?$session[sessionurl]u=$cats[catuserid]" rel="nofollow">$cats[username]</a>)
</if>
<div>$cats[description]</div>
<if condition="$show['subscribe_options']">
<div>[<a href="misc.php?$session[sessionurl]do=unsubscribe&amp;type=dir&amp;c=$cats[catid]&amp;return=subscriptions"><phrase 1="$vbphrase[category]">$vbphrase[unsubscribe_from_this_x]</phrase></a>]</div>
</if>
</div>
$subcatbits
</td>


</tr>


This is for Links Directory version 3.0 Gold, I'll update this if future versions will need some edits.

You can see it in action here: http://www.feelinggood24.de/links/
(has nothing to do with the blog with the long text at the top, this is another hack).

Perhaps this helpes someone. I did't test it with different Links Directory settings, so if it doesn't suit your needs, just revert the two templates to go back to the original. But I think it should be ok for everyone.

larina

larina
09-14-2008, 01:49 PM
Hmm, probably I better should tell you the other way around ... what to delete out of the original templates ...

In template ADV_LINKS delete:


<td align="center" class="thead" nowrap="nowrap">$vbphrase[last_link]</td>

<if condition="$vba_options['links_allowreplies'] AND $vba_options['links_showlastreply_column']">
<td align="center" class="thead" nowrap="nowrap">$vbphrase[last_reply]</td>
</if>

<td align="center" class="thead">$vbphrase[links]</td>
<if condition="$vba_options['links_allowreplies']">
<td align="center" class="thead">$vbphrase[replies]</td>
</if>
<if condition="$show['modcolumn']">
<td align="center" class="thead">$vbphrase[moderator]</td>
</if>



In template adv_links_categorybit_level2 delete:


<td class="alt2" style="white-space: nowrap">
<div class="smallfont">
<if condition="$cats['lastlinkid']">
<strong><a href="$cats[lastlinkurl]">$cats[lastlinktitle]</a></strong><br />
$vbphrase[by]
<if condition="$cats['lastlinkuserid']">
<a href="$vboptions[bburl]/member.php?$session[sessionurl]u=$cats[lastlinkuserid]" rel="nofollow">$cats[lastlinkusername]</a>
<else />
$vbphrase[guest]
</if>
<div align="$stylevar[right]">$cats[lastupdateddate] <span class="time">$cats[lastupdatedtime]</span> <a href="$cats[lastlinkurl]"><img alt="" border="0" src="$stylevar[imgdir_button]/lastpost.gif" /></a></div>
<else />
$vbphrase[never]
</if>
</div>
</td>

<if condition="$vba_options['links_allowreplies'] AND $vba_options['links_showlastreply_column']">
<td class="alt1" style="white-space: nowrap">
<div class="smallfont">
<if condition="$cats['lastpostdateline']">
<if condition="!$show['dateonly']">
<strong><a href="$cats[lastposturl]">$cats[lastpostlinktitle]</a></strong><br />
<if condition="$cats['lastpostuserid']">
<phrase 1="$vboptions[bburl]/member.php?$session[sessionurl]u=$cats[lastpostuserid]" 2="$cats[lastpostusername]">$vbphrase[by_x]</phrase>
<else />
$vbphrase[guest]
</if>
<br />
</if>
$cats[lastpostdate] <span class="time">$cats[lastposttime]</span>
<a href="$cats[lastposturl]"><img border="0" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" /></a>
<else />
$vbphrase[never]
</if>
</div>
</td>
</if>
<td align="center" class="$show[class_cat_links]"><span class="smallfont">$cats[linkcount]</span></td>
<if condition="$vba_options['links_allowreplies']">
<td align="center" class="$show[class_cat_replies]"><span class="smallfont">$cats[postcount]</span></td>
</if>
<if condition="$show['modcolumn']">
<td align="center" class="$show[class_cat_moderator]"><span class="smallfont">$cats[moderator]</span></td>
</if>



larina

Our Sponsors
 

DADOCTOR
04-02-2009, 06:06 AM
Thanks for this edit Larina

I just want to remove the "links" and "replies" column

but want to keep "last link" column

Would you be able to help me out with this?

and also I want to edit the "newest links" and "random links" section to remove the
last reply column, replies column and the views column so the only column showing is category column.

But to start with just the first question would be great to be able change

Thanks
Ryan

larina
04-02-2009, 09:55 AM
Hi Ryan,

I would need to test it, to be sure I am telling you the right. Sorry, to be honest, I don't want to make tests at my live-site since everything is running fine and there are people online.

Hopefully I at least can help you with your first question ...

Try NOT to remove the first part of each of those templates:

In the 1st template:

<td align="center" class="thead" nowrap="nowrap">$vbphrase[last_link]</td>

In the 2nd template:

<td class="alt2" style="white-space: nowrap">
<div class="smallfont">
<if condition="$cats['lastlinkid']">
<strong><a href="$cats[lastlinkurl]">$cats[lastlinktitle]</a></strong><br />
$vbphrase[by]
<if condition="$cats['lastlinkuserid']">
<a href="$vboptions[bburl]/member.php?$session[sessionurl]u=$cats[lastlinkuserid]" rel="nofollow">$cats[lastlinkusername]</a>
<else />
$vbphrase[guest]
</if>
<div align="$stylevar[right]">$cats[lastupdateddate] <span class="time">$cats[lastupdatedtime]</span> <a href="$cats[lastlinkurl]"><img alt="" border="0" src="$stylevar[imgdir_button]/lastpost.gif" /></a></div>
<else />
$vbphrase[never]
</if>
</div>
</td>


This should take care of your first question, but as I said, I didn't test it myself.

larina

Our Sponsors
 

DADOCTOR
04-03-2009, 06:17 AM
Thanks Larina,

Thank you for going into alot of detail about this

I will be sure to let you know how it goes

DADOCTOR
10-03-2009, 01:46 AM
It has taken me a long time to get around to doing this edit,
and it has worked very well,
My next mission is to edit the
category view page, I want to remove the "last post", "replies" and the "views" column's?

Thanks Larina for helping and taking time to explain the coding,
It has all been tested by me now and working well,

I would think that the next edit that I want to do should be just as easy?

Any ideas would be a great help, even to tell me what template I should be looking in

Thanks
Ryan