PDA

View Full Version : Neighbour Links on Detailed Page


Bangkok Bob
12-19-2006, 11:33 PM
Hi eSyndiCat Team,

Festive greetings to all and I am wondering if it possible to:

add to a detailed page maybe five random links from the same category as a "more listings like this" sort of feature mainly for surfers who landed directly on the detailed page from a search engine -- possibly just the titles linked to the relevant detail pages inside a custom box.

Best regards,
Bangkok Bob

Dave Baker
12-20-2006, 12:51 AM
Hello Bangkok Bob,
***Open view-link.php and find code***

/** breadcrumb formation **/
$bc['viewlink']['url'] = '';
$bc['viewlink']['caption'] = $gDirLang['view_link'];
$breadcrumb = $gDirLayout->print_breadcrumb($category['id'], $bc, 1);
$gDirSmarty->assign_by_ref('breadcrumb', $breadcrumb);

***Before this code add***

$neighbour_links =& $gDirDb->getLinksByCategory($category['id'], 0, 5);
$gDirSmarty->assign_by_ref('neighbour_links', $neighbour_links);

***Save file***
***Open tepmlates/YourTemplate/view-link.tpl and find line of code ***

{include file="footer.tpl"}

***Before this code add***
(for "ocean" template)

{if $neighbour_links}
<div class="box">
<div class="box-caption-right">
<div class="box-caption-left">
<div class="box-caption">{$lang.neighbour_links}</div>
</div>
</div>
<div class="box-content">
<div class="links">
<table cellspacing="0" cellpadding="0">
{foreach from=$neighbour_links item=link}
{include file="link-display.tpl"}
{/foreach}
</table>
</div>
</div>
<div class="box-footer-right">
<div class="box-footer-left">
<div class="box-footer"></div>
</div>
</div>
</div>
{/if}

(for GreenLeaves template)

{if $neighbour_links}
<div class="box">
<div class="box-caption-right">
<div class="box-caption-left">
<div class="box-caption">{$lang.neighbour_links}</div>
</div>
</div>
<div class="box-content">
<div class="links">
<table cellspacing="0" cellpadding="0">
{foreach from=$neighbour_links item=link}
{include file="link-display.tpl"}
{/foreach}
</table>
</div>
</div>
</div>
{/if}

***Save file***


Admin Panel » Language Manager » Add Phrase
Key: neighbour_links
Value: More listings like this
Category: common
» add

Bangkok Bob
12-20-2006, 04:44 AM
Hi Professor Dave Baker,

Your hot mods shop is really turning out stuff to order at a very rapid rate!

Just implemented your Alexa Thumbs (http://www.esyndicat.com/forum/post53062-24.html), Random Sort (http://www.esyndicat.com/forum/post54326-5.html) and now going to add your Neighbour Links (http://www.esyndicat.com/forum/post54355-2.html), too.

Many thanks for your quick response and great collection of mods.

This eSyndiCat directory/links exchange script really leaves the competitive products looking seriously less endowed in the feature richness and functionality departments.

Best regards,
Bangkok Bob

Dave Baker
12-21-2006, 05:09 PM
Thanks Bob for the positive report about eSyndicat and our work! :friends:

bunny
01-02-2007, 01:18 AM
Excellent Sir Baker.

Bryan Ex
01-02-2007, 01:49 AM
Just implemented your Alexa Thumbs (http://www.esyndicat.com/forum/post53062-24.html), Random Sort (http://www.esyndicat.com/forum/post54326-5.html) and now going to add your Neighbour Links (http://www.esyndicat.com/forum/post54355-2.html), too.

Bangkok Bob... are you using link comments with the Alexa thumbs... or do you have comments disabled?

Bangkok Bob
01-22-2007, 03:45 PM
Hi Professor Bryan Ex,

Apologies for the tardy reply as I only just revisited this thread for the post info again.

In answer to your question: I have link comments enabled but without captcha (on Pro version 1.2 install) and the call to the thumbnails scripts is in header.php.

Thanks for your thread about Alexa thumbs -- I lurked in Amazon Web Services forum for how-to info but your thread and posts by Dave Baker were the real mother lode that got me in business with the thumbnail displays.

Best regards
Bangkok Bob

Bryan Ex
01-25-2007, 08:02 PM
In answer to your question: I have link comments enabled but without captcha (on Pro version 1.2 install) and the call to the thumbnails scripts is in header.php.
Have you tested actually submitting a comment with your set up? Everything seemed to work fine for me until I clicked on "Submit" and that's when I received a header conflict. If it works for you then I'll need to figure out what is different between our scripts.

Bangkok Bob
01-29-2007, 03:14 PM
Hi Bryan,

Yes it works fine for me on the detailed page.

Please feel free to try out this example page (http://www.bangkokworld.com/bars-and-pubs/silom-road/the-duke-of-wellington-l320.html) if you like (comments textarea has minimum of 50 chars set).

Best regards,
Bangkok Bob

kamy81
03-22-2007, 05:14 PM
I have tried to add this features but my detail page shows as blank .
What is the modification to show Neighbour Links on Detailed Page for eSyndiCat 2.1.02.

Please help :poisk:

Dragosla
03-22-2007, 10:59 PM
I have tried to add this features but my detail page shows as blank .
What is the modification to show Neighbour Links on Detailed Page for eSyndiCat 2.1.02.

Please help :poisk:

My green leaves is blank too after that update, or maybe to have previous and next links just before Comment, help please

regards
Dragos

Dave Baker
03-23-2007, 05:34 PM
Please try the following:
***Open view-link.php and find code***

/** breadcrumb formation **/
$bc['viewlink']['url'] = '';
$bc['viewlink']['caption'] = $gDirLang['view_link'];
$breadcrumb = $gDirLayout->print_breadcrumb($category['id'], $bc, 1);
$gDirSmarty->assign_by_ref('breadcrumb', $breadcrumb);

***Before add***

/** get links for this category **/
$featured_top = ($config->get('order_featured') && $config->get('featured_links')) ? TRUE : FALSE;
$sponsored_top = ($config->get('sponsored_top') && $config->get('sponsored_links')) ? TRUE : FALSE;
$links = $Category->getLinks($category['id'], 0, 10, $featured_top, $sponsored_top, $gDirEditor['id']);

$p = '';
if($category['id'] != '0')
{
$p = $category['path'].'/';
}

$c = count($links);
for($i=0; $i < $c; $i++)
{
$links[$i]['path'] = $p;
}
$gDirSmarty->assign_by_ref('neighbour_links', $links);

***Save file***
***Open tepmlates/YourTemplate/view-link.tpl and find the line of code ***

{include file="footer.tpl"}

***Before add:***

{if $neighbour_links}
{include file="box-header.tpl" caption=$lang.neighbour_links}
<div class="links">
{foreach from=$neighbour_links item=link}
<div class="sponsored-link"><a href="{$link.url}" class="title" id="l{$link.id}" {if $config.new_window}target="_blank"{/if}>{$link.title}</a></div>
{/foreach}
</div>
{include file="box-footer.tpl"}
{/if}

should be right for all templates
***Save file***
Admin Panel » Language Manager » Add Phrase
Key: neighbour_links
Value: Neighbour Links
Category: common
» add

Dragosla
03-23-2007, 11:25 PM
In 2.1 update is working fine, thanks for quick help.

Esynd is really great script I am proud of owning it. God bless ya all.

ibs
03-24-2007, 05:51 AM
ohhh this one is lovely too - real nice, and it works for me real good - - thanks

Dave Baker
03-25-2007, 05:30 PM
Esyndicat always at your services! :)

StanG
09-30-2007, 06:37 AM
This mod doesn't work for version 2.1.03=(((((

Dave Baker
10-01-2007, 05:18 AM
Welcome to our forum StanG,
This modification should work with all 2.1.x versions.
Please try to reimplement this modification.

ellan
10-19-2007, 03:01 AM
Ok, I found, it works on 2.1.03, but could you please modify some strings to avoid redisplaying the same links on the view-link page.

Example:
Now:
We are on the view-link page of link #3.
Neighbourhood links:
#1
#2
#3
#4
#5
What I think really shoul be:
We are on the view-link page of link #3
Nrighbourhood links:
#1
#2
#4
#5

Because if they are not really random, let them exclude the link #3. Please. Thank you so much.

PS I used code from post #12. I use version 2.1.03/

Thank you so much.

ellan
10-22-2007, 10:51 AM
Up the topic=)

ellan
10-24-2007, 08:00 AM
Dear Support, Pelaes PAY ATTENTION AT this topic, it's very important!!!! I still have big problems with this mod, and this is the only thing that makes problems with validation on my SITE!!!!

John Turner
10-24-2007, 11:32 AM
Hi ellan,
Here solution for you in compliance with Dave's post #12 here change set to avoid duplicated links display.

change this code

/** get links for this category **/
$featured_top = ($config->get('order_featured') && $config->get('featured_links')) ? TRUE : FALSE;
$sponsored_top = ($config->get('sponsored_top') && $config->get('sponsored_links')) ? TRUE : FALSE;
$links = $Category->getLinks($category['id'], 0, 10, $featured_top, $sponsored_top, $gDirEditor['id']);

$p = '';
if($category['id'] != '0')
{
$p = $category['path'].'/';
}

$c = count($links);
for($i=0; $i < $c; $i++)
{
$links[$i]['path'] = $p;
}
$gDirSmarty->assign_by_ref('neighbour_links', $links);


to the following code

/** get links for this category **/
$featured_top = ($config->get('order_featured') && $config->get('featured_links')) ? TRUE : FALSE;
$sponsored_top = ($config->get('sponsored_top') && $config->get('sponsored_links')) ? TRUE : FALSE;
$links = $Category->getLinks($category['id'], 0, 10, $featured_top, $sponsored_top, $gDirEditor['id']);

$p = '';
if($category['id'] != '0')
{
$p = $category['path'].'/';
}

$c = count($links);
for($i=0; $i < $c; $i++)
{
$links[$i]['path'] = $p;
if($links[$i]['id'] == $link['id'])
{
unset($links[$i]);
}
}
$gDirSmarty->assign_by_ref('neighbour_links', $links);


HTH

ellan
10-24-2007, 11:40 PM
Yep, it works=) All is fine. Thnak you. Now I am ready to finish my validation...=)

kamy81
04-22-2008, 08:24 PM
After log time I am here again.. I am using eSyndiCat 2.1.02 (Plain) and I saw many update version available on download area but I could not think about to update. Because these long time I missed many things.. Really eSyndiCat team doing good job. All time they are updating.:good:

Could you please change #21 modification to show related links. I mean neighbour links shows same result for all link. It shows recent 10 links in category for all links.But I want to show deferent result in each link details page.

Say,
Link 1 shows neighbour links - recent 1,2,3,4,5...10 links
And link 45 shows neighbour links - recent 1,2,3,4,5...10 links (both links shows same result )

I want to show deferent result for each link. like:
Link 1 will show related links - match with link 1
And link 45 will show related links - match with link 45

Please help with this modification.

kamy81
04-23-2008, 06:03 PM
OR it can show random links by category instead neighbor links

Greg
04-23-2008, 09:11 PM
Hi kamy

It's much better if you post questions related to the ProVersion here:
http://www.esyndicat.com/forum/forum-29.html

Thanks :)

minis
04-24-2008, 06:20 AM
Could anyone help to make this working for free version?

Nikita B.
04-24-2008, 11:40 AM
Open view-listing.php, find code

/** breadcrumb formation **/
$bc['viewlisting']['url'] = '';
$bc['viewlisting']['caption'] = $gDirLang['view_listing'];
$breadcrumb = $gDirLayout->print_breadcrumb($listing['id_category'], $bc, 1);
$gDirSmarty->assign_by_ref('breadcrumb', $breadcrumb);

after add

$neighbour_links = $Category->getListings($listing['id_category'], 0, 5);
$gDirSmarty->assign('neighbour_links', $neighbour_links);


Where '5' number of links in this block

open templates/your_template/view-listing.tpl
find code


{include file="footer.tpl"}
add before

{if $neighbour_links}
{include file="box-header.tpl" caption='Neigbour Listings' style="green"}
<div class="box-content">
<div class="listings">
<table cellspacing="0" cellpadding="0">
{foreach from=$neighbour_links item=listing}
{include file="listing-display.tpl"}
{/foreach}
</table>
</div>
</div>
{include file="box-footer.tpl"}
{/if}

minis
04-24-2008, 09:45 PM
It works, but few jottings:
1) Details page Friendly URL doesn't (it shows dir.com/lisitng-l1.html, but it should dir.com/CATEGORY/SUBCATEGORY/lisitng-l1.html)

2) How to display 5 random listing vice 5 static?

minis
04-27-2008, 07:40 PM
1) Still the problem

2) Solved

minis
04-29-2008, 07:31 AM
Any help? :huh:

myhub
10-07-2008, 01:50 AM
Open view-listing.php, find code

/** breadcrumb formation **/
$bc['viewlisting']['url'] = '';
$bc['viewlisting']['caption'] = $gDirLang['view_listing'];
$breadcrumb = $gDirLayout->print_breadcrumb($listing['id_category'], $bc, 1);
$gDirSmarty->assign_by_ref('breadcrumb', $breadcrumb);

after add

$neighbour_links = $Category->getListings($listing['id_category'], 0, 5);
$gDirSmarty->assign('neighbour_links', $neighbour_links);


Where '5' number of links in this block

open templates/your_template/view-listing.tpl
find code


{include file="footer.tpl"}
add before

{if $neighbour_links}
{include file="box-header.tpl" caption='Neigbour Listings' style="green"}
<div class="box-content">
<div class="listings">
<table cellspacing="0" cellpadding="0">
{foreach from=$neighbour_links item=listing}
{include file="listing-display.tpl"}
{/foreach}
</table>
</div>
</div>
{include file="box-footer.tpl"}
{/if}


How to get this to work for eSyndiCat Pro Version 2.2.06 with mod-rewrite enabled?

Vladimir T.
10-07-2008, 09:45 AM
Look at here: http://www.esyndicat.com/forum/about15984.html