View Full Version : Links Display Question
DougCooper
09-07-2004, 09:54 AM
Is there a way to display the links in the 'search engine' style ???
At the moment my links directory is here : http://www.soul2streets.com/links/index.php?
It's basically a long list of sections and catagories,
I want to change the display so the sections look more like the following attached image :
Brian
09-07-2004, 01:06 PM
It shouldn't be too hard to change the templates so that they would look more like that.
macker123
10-11-2004, 09:02 PM
It shouldn't be too hard to change the templates so that they would look more like that.
Are you able to help with an example. I know I am wanting to do it, so I am sure there are others.
I tried to create a quick incrementing subroutine to display even on one side and odd on the other, but couldn't figure out which variable to call so that it would work correctly.
I am very bad at coding but this is a start unfortunatly it gives errors and I have no idea if it is even coded properly:
<?php
while (!empty($cats[catid]))
{
?>
<tr>
<?php
for ($i = 0; $i < 3; $i++)
{
if (!empty($cats[catid]))
{
?>
<td class="alt1"><b><a href="browselinks.php?$session[sessionurl]c=$cats[catid]">$cats[title]</a></b>
<span class="smallfont">($cats[linkcount])</span> <div class="smallfont">$cats[description]</div>
<if condition="$show['subscribe_options']">
<div class="smallfont"> [<a href="misc.php?$session[sessionurl]do=unsubscribe&type=dir&c=$cats[catid]&return=subscriptions">$vbphrase[unsubscribe_from_this_directory]</a>]
</div>
</if> </td>
<?
}
else
{
echo '<td> </td>';
}
$catid++;
}
?>
</tr>
<?
}
?>
DougCooper
10-21-2004, 10:10 AM
Brian ?
Brian
10-21-2004, 11:07 AM
This should at least get you started on changing the layout...
In your forum/includes/functions_links.php file look for:
if ($show['modcolumn'])
Right Above that Add:
$linkscount++;
if ($linkscount == 3)
{
$linkscount = 0;
}
Then look for:
$catcollapse = $vbcollapse["collapseobj_dirbit_" . $cats['catid'] . ""];
And right Above that Add:
$linkscount = 0;
Now edit your 'adv_links_directorybit' template and at the very top add:
<td width="50%">
<table width="100%">
<tr>
Then at the very bottom of the template add this:
</table>
</td>
<if condition="$linkscount == 2">
</tr>
<tr>
</if>
Now as I said at the beginning of this post, that will just get you started and give you the two columns. You'll still need to edit the template and probably move some of the things around, but that should just be some simple HTML work. ;)
DougCooper
10-21-2004, 11:14 AM
Thx Brian, will get on the case mate cheers
macker123
10-21-2004, 04:30 PM
It works great. I just got it working. Thanks
Lionel
11-16-2004, 05:12 PM
I followed instructions. Please can I get a hint on why I keep on getting 3 columns instead of two? I also tried playing with the numbers in $linkcount
Brian
11-16-2004, 05:44 PM
Could you please update the website you have in your license information? The site you have listed there is running vB2.
Lionel
11-16-2004, 05:49 PM
sorry... got too many sites...
Lionel
11-16-2004, 06:23 PM
sent you a PM, so I do not know what you want me to do? Change it back the way it was or leave it with the new info?
Brian
11-16-2004, 06:27 PM
Not sure why it wouldn't work, but if you'd like to submit a support ticket I'll be glad to take a look.
You also need to restore the copyright notice before submitting the ticket.
Lionel
11-16-2004, 06:35 PM
Ok, done! Thank you for looking it up for me... I have been trying to finalize that site for a while now...
Lionel
11-16-2004, 10:24 PM
I've tried all different probalities with template... I just can't get it to work.
Rebecca
06-02-2005, 10:38 PM
I'm interested in this, too. When I went to make the changes, I noticed that there are now three directorybit templates in version 1.0 (adv_links_directorybit_level1, adv_links_directorybit_level2, and adv_links_directorybit_main). How would I adjust this to work in the updated version?
Thanks!
Rebecca
Rebecca
06-03-2005, 11:01 AM
Ok, I figured this out for the new version. In case anyone is interested, all the changes are exactly the same, except you modify the adv_links_directorybit_level1 template instead of adv_links_directorybit.
Rebecca
Lionel
06-03-2005, 12:50 PM
Ok, I figured this out for the new version. In case anyone is interested, all the changes are exactly the same, except you modify the adv_links_directorybit_level1 template instead of adv_links_directorybit.
Rebecca
where exactly did you place it in template?
Rebecca
10-19-2005, 09:00 PM
Hi Brian,
Was there ever a ticket submitted on this? I'm having the same issue Lionel was having; the double columns work fine until after the fifth category is added, and then it spreads out to three columns.
example (http://www.christianwriters.com/forums/markets/)
If a ticket was submitted, do you happen to remember what the fix to this one was?
Thanks! :)
Rebecca
mattyk72
04-10-2006, 11:07 AM
Hey Rebecca I really like the layout of your links directory, would you mind sharing how you did that?
Rebecca
04-10-2006, 12:47 PM
Thanks for the complement. :) I accomplished the layout with a combination of the above modification, some help from Brian, and customizing the Links templates. It shouldn't be too difficult to replicate, provided you know html.
If you install the modification here and find that your column "bumps out" as described in this thread, please let me know. I'll be happy to post the altered php code I have in my installation. Fair warning -- even in my installation, although the problem is reduced, the column does still "bump out" under certain conditions.
Thanks,
Rebecca
MadMan
06-20-2006, 06:58 AM
Thanks for the complement. :) I accomplished the layout with a combination of the above modification, some help from Brian, and customizing the Links templates. It shouldn't be too difficult to replicate, provided you know html.
If you install the modification here and find that your column "bumps out" as described in this thread, please let me know. I'll be happy to post the altered php code I have in my installation. Fair warning -- even in my installation, although the problem is reduced, the column does still "bump out" under certain conditions.
Thanks,
Rebecca
Can you please post it how did you fixe the bumping problem.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.