PDA


View Full Version : Width of View of main /links/index.php output?


Quarterbore
01-25-2006, 04:36 PM
I have an issue with the links directory and the width of the standard links index page. My problem is that I am using the left column hack for vBa and the main index for the links in the directory view is not limited to page width...

Can someone help me figure out where and how I need to update this so that it fits on the screen?

Here is a link:

http://www.timeshareforums.com/resorts/index.php

EDIT 1:

OK, it looks like the issue is in the printing of the "NAME" of the link in the links directory... I see the width of the link name does not shorten past the length of the longest name...

Edit 2:

I fixed the problem by shortening the name of my "LINK" as printed... So, the issue is that the "NAME" does not wrap when the cell gets too short. So, I managed to get this working for my imediate needs by cutting this down. My only concern for my needs is that this "NAME" is a keyword that my users may search and use in the future as I develope this database.

So, I would like some advise on how to allow the text in this cell to wrap if possible!

Brian
01-25-2006, 05:38 PM
Admin CP => vBa Links Directory => Modify Settings => Main Index Page Options => Maximum Characters of Last Link ;)

Quarterbore
01-25-2006, 06:07 PM
OK, so if I set this as a value it cuts off the text... but then the column on the left expands to cover any extra space...

If you look at this page:

http://www.timeshareforums.com/resorts/browselinks.php?do=browselinks&catid=35&ltr=T&linkuserid=0

Note how long the 3rd resort name is...

So, now it cuts the name down but when you go to ths page:

http://www.timeshareforums.com/resorts/index.php

You can see that the "name" column is now a fixed width... Is it possible to have this long name wrap? It sure would look better!

Also note how most anything else wraps... I just can't figure out where the line of code is that is making this non wrapping text!

EDIT 3.

The code is betwen these two templates:

adv_links_directorybit_level2

and

adv_links_directorybit_level1

I am working on figuring it out

Edit 4 (or is it abut 10 now...)

I have finally fixed mine and I will share what I learned...

If we remove the "nowrap" from the code the cells have predefined widths from somewhere in the code and I couldn't find it. So, like any amature hack I liiked for another solution!

For this fix I needed to ONLY make modifications to the template: adv_links_directorybit_level2

The Original Template looked like this:


<td class="alt2" nowrap="nowrap">
<if condition="$cats['lastlinkid']">
<span class="smallfont"><b><a href="showlink.php?$session[sessionurl]do=showdetails&amp;l=$cats[lastlinkid]">$cats[lastlinktitle]</a></b><br />
$vbphrase[by]
<if condition="$cats['lastuserid']">
<a href="$vboptions[bburl]/member.php?$session[sessionurl]u=$cats[lastuserid]">$cats[lastposter]</a>
<else />
$vbphrase[guest]
</if>
</span><div class="smallfont" align="right">$cats[lastupdateddate] <span class="time">$cats[lastupdatedtime]</span> <a href="showlink.php?$session[sessionurl]do=showdetails&amp;l=$cats[lastlinkid]"><img alt="" border="0" src="$stylevar[imgdir_button]/lastpost.gif" /></a></div>
<else />
<div align="center">$vbphrase[never]</div>
</if>
</td>


My Updated Code looks like this:


<td class="alt2">
<table width="350"><tr><td>
<if condition="$cats['lastlinkid']">
<span class="smallfont"><b><a href="showlink.php?$session[sessionurl]do=showdetails&amp;l=$cats[lastlinkid]">$cats[lastlinktitle]</a></b><br />
$vbphrase[by]
<if condition="$cats['lastuserid']">
<a href="$vboptions[bburl]/member.php?$session[sessionurl]u=$cats[lastuserid]">$cats[lastposter]</a>
<else />
$vbphrase[guest]
</if>
</span><div class="smallfont" align="right">$cats[lastupdateddate] <span class="time">$cats[lastupdatedtime]</span> <a href="showlink.php?$session[sessionurl]do=showdetails&amp;l=$cats[lastlinkid]"><img alt="" border="0" src="$stylevar[imgdir_button]/lastpost.gif" /></a></div>
<else />
<div align="center">$vbphrase[never]</div>
</if>
</td></tr></table>
</td>


The changes were the removal of the NoWrap but this really messed up the layout! So, by adding a fixed width table inside this cell but allowing the text to wrap inside my new table gave me a result I can live with...

I hope this helps someone else... If there is a cleaner way of doing this I would love to hear about it as I have a LOT of template updates I want to do with this database and I am just trying to get a basic understanding of how it works so far...

OH yea, I also had to update the other page: adv_links_directorybit_level1

So that I got rid of a NOWRAP as follows:

Before:


<td class="alt2" nowrap="nowrap">
<if condition="$cats['lastlinkid']">
<span class="smallfont"><b><a href="showlink.php?$session[sessionurl]do=showdetails&amp;l=$cats[lastlinkid]">$cats[lastlinktitle]</a></b><br />
$vbphrase[by]
<if condition="$cats['lastuserid']">
<a href="$vboptions[bburl]/member.php?$session[sessionurl]u=$cats[lastuserid]">$cats[lastposter]</a>
<else />
$vbphrase[guest]
</if>
</span><div class="smallfont" align="right">$cats[lastupdateddate] <span class="time">$cats[lastupdatedtime]</span> <a href="showlink.php?$session[sessionurl]do=showdetails&amp;l=$cats[lastlinkid]"><img alt="" border="0" src="$stylevar[imgdir_button]/lastpost.gif" /></a></div>
<else />
<div align="center">$vbphrase[never]</div>
</if>
</td>


After:


<td class="alt2">
<if condition="$cats['lastlinkid']">
<span class="smallfont"><b><a href="showlink.php?$session[sessionurl]do=showdetails&amp;l=$cats[lastlinkid]">$cats[lastlinktitle]</a></b><br />
$vbphrase[by]
<if condition="$cats['lastuserid']">
<a href="$vboptions[bburl]/member.php?$session[sessionurl]u=$cats[lastuserid]">$cats[lastposter]</a>
<else />
$vbphrase[guest]
</if>
</span><div class="smallfont" align="right">$cats[lastupdateddate] <span class="time">$cats[lastupdatedtime]</span> <a href="showlink.php?$session[sessionurl]do=showdetails&amp;l=$cats[lastlinkid]"><img alt="" border="0" src="$stylevar[imgdir_button]/lastpost.gif" /></a></div>
<else />
<div align="center">$vbphrase[never]</div>
</if>
</td>


Lastly I put this second one in a table so that the rest of my directory views match like follows:


<td class="alt2">
<table width="350"><tr><td>
<if condition="$cats['lastlinkid']">
<span class="smallfont"><b><a href="showlink.php?$session[sessionurl]do=showdetails&amp;l=$cats[lastlinkid]">$cats[lastlinktitle]</a></b><br />
$vbphrase[by]
<if condition="$cats['lastuserid']">
<a href="$vboptions[bburl]/member.php?$session[sessionurl]u=$cats[lastuserid]">$cats[lastposter]</a>
<else />
$vbphrase[guest]
</if>
</span><div class="smallfont" align="right">$cats[lastupdateddate] <span class="time">$cats[lastupdatedtime]</span> <a href="showlink.php?$session[sessionurl]do=showdetails&amp;l=$cats[lastlinkid]"><img alt="" border="0" src="$stylevar[imgdir_button]/lastpost.gif" /></a></div>
<else />
<div align="center">$vbphrase[never]</div>
</if>
</td></tr></table>
</td>

Quarterbore
01-26-2006, 09:45 PM
No suggestions on a better way?