View Full Version : Blank listings !
Hy.
Haw can i make the link listings as a new page like submit.php .
My problem is that i use a backgroundimage on the main page and dont like this image on the linklistings.
Emir
Optimit
03-23-2006, 07:28 PM
You should be able to create a style in main.css. Something like below.
Content visible to registered users only.
then open link.tpl and add that style to the table that wraps the links.
And when somebody go to a category wher not listings are they will see the bckground from the main.
Thats the problem.
emir
Optimit
03-23-2006, 07:42 PM
then find the place in main.tpl where is calls for the links and insert a table, if there is not one. then style just that table to your preferred size and place the include code for the links in it.
I have try it and they dont works!
Here is my main.tpl
------------------------------------
{* Calculate title from path *}
{capture name="title"}
{if count($path)>1} - {/if}
{foreach from=$path item=category name=path}
{if $smarty.foreach.path.iteration gt 2}
>
{/if}
{if not $smarty.foreach.path.first}
{$category.TITLE}
{/if}
{/foreach}
{/capture}
{strip}
{assign var="in_page_title" value=$category.TITLE}
{assign var="description" value=$category.DESCRIPTION}
{include file="header.tpl"}
{include file="top_bar.tpl"}
<TABLE width="703" height=345 cellSpacing=10 cellPadding=5 width="70%" align=center border="0" cellpadding="0" cellspacing="0" background="http://emir.fun.be/phpLD/images/9.gif">
<tr>
<td>
{* Calculate the number of categories per row *}
{php}
$this->assign('cats_per_col', ceil(count($this->get_template_vars('categs'))/ CATS_PER_ROW)); {/php} {* Display categories heading if not on homepage *} {if $category.ID gt 0 and count($categs) gt 0}
{/if}
{* Categories *}
<table width="95%" align="center" border="0" cellpadding="0" cellspacing="0"><tr>
{foreach from=$categs item=cat name=categs}
{if ($smarty.foreach.categs.iteration mod $cats_per_col eq 1 and $cats_per_col gt 1) or $smarty.foreach.categs.first}<td valign="top">{/if}
<h1>Content visible to registered users only.{$cat.TITLE} ({if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL}/{else}index.php?c={$cat.ID}{/if}){if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}</h1>
{* Display subcategories *}
{if $cat.SUBCATS}
{foreach from=$cat.SUBCATS item=scat name=scategs}
<class="url"><a class="sub" href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL}/{$scat.TITLE_URL}/{else}index.php?c={$scat.ID}{/if}">
{$scat.TITLE}</a>, {/foreach} ...
{/if}
{if ($smarty.foreach.categs.iteration mod $cats_per_col eq 0 and $cats_per_col gt 1) or $smarty.foreach.categs.last}</td>{/if}
{/foreach}
</tr></table>
{* Links heading and sorting*}
{if ($qu or $category.ID gt 0 or $p) and count($links) gt 0}
{* Pager (not used yet) *}
{if !empty($list_total)}
<table width="453" border="0" align="center" cellpadding="0" cellspacing="0" background="http://emir.fun.be/phpLD/images/.gif">
<tr>
<td height="30">
<div class="navig">
<div style="float: right">
{if $smarty.const.ENABLE_REWRITE}
{assign var='url_pattern' value='?p=$'}
{/if}
{pager rowcount=$list_total limit=$smarty.const.PAGER_LPP class_num="" class_numon="a" class_text="" posvar="p" show="page" txt_next="Next" txt_prev="Previous" shift="1" separator=" " wrap_numon="[|]" url_pattern="$url_pattern"}
</div>
</div>
</td>
</tr>
</table>{/if}
{foreach from=$links item=link name=links}
{include file="link.tpl" link=$link}
{/foreach}
</div><div style="float: right">
{if $smarty.const.ENABLE_REWRITE}
{assign var='url_pattern' value='?p=$'}
{/if}
{pager rowcount=$list_total limit=$smarty.const.PAGER_LPP class_num="" class_numon="a" class_text="" posvar="p" show="page" txt_next="Next" txt_prev="Previous" shift="1" separator=" " wrap_numon="[|]" url_pattern="$url_pattern"}
</div>
{/if}
</td>
<td width="220" valign="top">
<table width="150" border="0" align="right" cellpadding="0" cellspacing="0" style="margin-top:10px;">
<tr> </tr>
<tr>
<td class="ads-container"><div align="center">
{if $category.ID eq 0 and not $p}
{include file="google-home.tpl"}
{else}
{include file="google-sub.tpl"}
{/if}
</div></td>
</tr>
</table>
</td>
</tr>
</table>
{* Javascript for tracking link clicks *}
<script type="text/javascript">
var root = '{$smarty.const.DOC_ROOT}';
{literal}
var a = document.getElementsByTagName("a");
for(i=0; i<a.length; i++)if(a[i].id != '')
a[i].onclick = count_link;
function count_link(){
i = new Image();
i.src= root+'/cl.php?id='+this.id;
return true;
}
{/literal}
</script>
</table></div>
{include file="footer.tpl"}
{include file="footer2.tpl"}
{/strip}
where must i put the table that the link listings are crated in the tabe?
Emir
Optimit
03-23-2006, 08:30 PM
Here is the section I would try.
Content visible to registered users only.
Keep in mind, I have never done this on a real directory, so I am only taking a stab at how to accomplish what you want.
ALWAYS make backups before you try something that may not work.
and where is the table?
can you post he code with the table.
thanks
Optimit
03-23-2006, 08:47 PM
Content visible to registered users only.
Something like that. Like I said. not sure if it will work, but cant hurt to try it.
Optimit
03-23-2006, 08:58 PM
You will prbably have to add the same style to the table in link.tpl.
you can see it working here www.tripsdirectory.com
At least I think that is what you are wanting, except your background would be white to hid the background image you have set on the page.
Hey.
That works.
You are a real networker !
:D
And haw can i make when the listigs only 2 links are that the links be displayed on the top and not in the midle of the table?
Optimit
03-23-2006, 09:22 PM
Maybe change the first instance of <td> to <td valign="top">
You are the King !!!!!
Thank you very much for the help.
Emir
Optimit
03-23-2006, 09:44 PM
GLad I could help. Not often that my ideas work, but I try.
They dont Works !!
I have created the table with your code but i see the table also at the main page.
Why?
Emir
Optimit
03-23-2006, 10:35 PM
send a url to your site
ok.here is the url.
{url moved or deleted}
and you will see the the table.
links are only at the category - Arbeitgeber -
tanks
Optimit
03-23-2006, 11:13 PM
OK, two things.
make sure you have this part
Content visible to registered users only.
included into the table. it should be the last thing before the table closes. You can see it in my example a couple of posts ago.
ALso, make sure the border on the table is set to 0.
i do it and they dont works.
i dont see the table now in the main but it s a very big distance at the main.
Do you nowhy?
Optimit
03-23-2006, 11:26 PM
Emir, I am not sure what is causing that on the table. When I go to your site, I see a large squeare where the table would be, and it is filled with Blue dots.
You were very close to having it before you made the last changes.
the blue dots are a demo for the backgroundimage of the linklistings table.
Optimit
03-23-2006, 11:33 PM
Ok, well I am not sure why you are using images as backgrounds on the table in link.tpl and main.tpl, but as long as you have those there, you will see them.
Optimit
03-23-2006, 11:38 PM
Check you image link in link.tpl
Content visible to registered users only.
see? You dont have an image specified. Only a .gif
i now becouse that i not the problem.
Optimit
03-23-2006, 11:50 PM
Well,
I am not sure what you are trying to do now. You have used the arrow.gif images in the table we put in main.tpl. That is why you see the blue arrows on the main page.
i put the arrow images as backround that yo can see where the table is.without the arrow images are there same.A big distance.
:cry:
Optimit
03-23-2006, 11:58 PM
You should not use the "height" code on the table in main.tpl. Only in the table in link.tpl
when i use the height code in the link.tpl than is a catastrof at the linklistings .look - i use it.
Optimit
03-24-2006, 12:10 AM
Emir, You are very close to having what you need. I cannot design your site for you from miles away like this. I gave you the basic information you needed, but it is up to you to do the minor adjustments to make it fit your site.
k
Just remember to set the bacground colors to white on those tables, and then play around with size settings to get them to look the way you want.
Sorry, wish I could help more.
vBulletin® v3.8.0, Copyright ©2000-2012, Jelsoft Enterprises Ltd.