PDA

View Full Version : ExFeed beta release


Sergey Ten
05-17-2007, 10:40 AM
Hello all,

I am glad to introduce new tool that allows you exchange link form another eSyndiCat directories.

HOW TO INSTALL

You have to download ExFeed here (http://www.xootest.com/downloads/exfeed-beta.zip)

#1 Upload a updates/exfeed.sql to folder "updates".
#2 Execute sql file via admin panel of eSyndiCat.

Now you have to register your domain here (http://www.xootest.com/registration/registration.php). After registration you will see a key, copy it and paste to Admin Panel » Configuration » General Configuration » ExFeed Key.

#3 Upload folder "exfeed" to folder where eSyndiCat installed.
#4 Set permission 777 for "exfeed/includes/config.inc.php".
#5 Run installation script "exfeed/install/install.php".


If you will have any problems/questions with it try to contact with me via Live chat/PM/email (sten at esyndicat dot com).

Sergey Ten
05-17-2007, 10:41 AM
After you have to make some changes in the eSyndiCat script.

[ Open your admin/login.php ]
[ Find code ]


setcookie("admin_name", $admin['username'], 0);
setcookie("admin_pwd", $pwd, 0);


[ Replace with ]


setcookie("admin_name", $admin['username'], 0, '/');
setcookie("admin_pwd", $pwd, 0, '/');


[ Save change ]


[ Open your admin/top.php ]
[ Find code ]


$mnuMain['cache']['caption'] = $gDirLang['manage_cache'];
$mnuMain['cache']['url'] = 'manage-cache.php';


[ After add this snippet ]


$mnuMain['exfeed']['caption'] = 'ExFeed';
$mnuMain['exfeed']['url'] = $config->get('base').$config->get('dir').'exfeed/exfeed.php';


[ Save change ]


[ Open your includes/view.inc.php ]
[ Find code ]


/** get partner links **/
if ($config->get('partner_links'))
{
$partner_links = $Link->getPartner($id, 0, $config->get('num_partner_display'));
$gDirSmarty->assign_by_ref('partner_links', $partner_links);
}


[ Replace with ]


/** ExFeed MOD **/
$positions = array('left', 'right');

foreach($positions as $value)
{
$list = $Link->getList($value);
$gDirSmarty->assign($value.'_list', $list);
}


[ Save change ]


[ Open your templates/your_template/header.tpl ]
[ Find code ]


{if $news && $config.news}
<!-- news box start -->
{include file="box-header.tpl" caption=$lang.news style="orange"}
<div class="links">
{foreach from=$news item=one_news}
<div class="news-title">
{if $config.mod_rewrite}
<a href="{$config.base}{$config.dir}news/{$one_news.alias}-n{$one_news.id}.html" id="news{$one_news.id}">{$one_news.title}</a></div>
{else}
<a href="{$config.base}{$config.dir}news.php?id={$one_news. id}" id="news{$one_news.id}">{$one_news.title}</a></div>
{/if}
<div class="news-body">{$one_news.body|truncate:$config.news_max:"..."}</div>
<div class="news-date">{$one_news.date|date_format:$config.date_format}</div>
{/foreach}
</div>
{include file="box-footer.tpl"}
<!-- news box end -->
{/if}


[ After add code ]


<!-- ExFeed box -->
{foreach from=$left_list item=list}

{if $list.title eq ''}
{assign var="list_title" value=$list.url}
{else}
{assign var="list_title" value=$list.title}
{/if}

{include file="box-header.tpl" caption=$list_title style="orange"}
<div class="links">

{literal}
<script type="text/javascript" src="{/literal}{$list.url}{literal}/exfeed/feeding.php?num={/literal}{$list.number}{literal}"></script>
<script type="text/javascript">

var out = '';
if(false != data)
{
for(var i = 0; i < data.length; i++)
{
out += '<div class="sponsored-link">';
out += '<a href="' + data[i].url + '" class="title" id="l' + data[i].id + '" target="_blank">' + data[i].title + '</a>';
out += '</div>';
}
}

document.write(out);
</script>
{/literal}

</div>
{include file="box-footer.tpl"}

{/foreach}
<!-- ExFeed box end -->


[ Save change ]


[ Open your templates/your_template/footer.tpl ]
[ Find code ]


{if $sponsored_links}
<!-- sponsored links box start -->
{include file="box-header.tpl" caption=$lang.sponsored_links style="orange"}
<div class="links">
{foreach from=$sponsored_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"}
<!-- sponsored links box end -->
{/if}


[ After add code ]


<!-- ExFeed box -->
{foreach from=$right_list item=list}

{if $list.title eq ''}
{assign var="list_title" value="Links"}
{else}
{assign var="list_title" value=$list.title}
{/if}

{include file="box-header.tpl" caption=$list_title style="orange"}
<div class="links">

{literal}
<script type="text/javascript" src="{/literal}{$list.url}{literal}/exfeed/feeding.php?num={/literal}{$list.number}{literal}"></script>
<script type="text/javascript">

var out = '';
if(false != data)
{
for(var i = 0; i < data.length; i++)
{
out += '<div class="sponsored-link">';
out += '<a href="' + data[i].url + '" class="title" id="l' + data[i].id + '" target="_blank">' + data[i].title + '</a>';
out += '</div>';
}
}

document.write(out);
</script>
{/literal}

</div>
{include file="box-footer.tpl"}

{/foreach}
<!-- ExFeed box end -->


[ Save change ]


[ Open your includes/classes/DirLink.php ]
[ Add new function with code ]


function getList($aPosition)
{
$this->setTable('exfeed');
$list = $this->all("`url`, `number`, `title`", "`position` = '{$aPosition}' AND `status` = 'active'");
$this->resetTable();

return $list;
}

Sergey Ten
05-17-2007, 10:44 AM
How it works

There are two lists "Allow List" and "Getting List".

"Allow List" - This is list of domains for which it is authorized to take links from your directory.
"Getting List" - This is list of domains from which you want to take links.

For example you have two eSyndiCat directories and on both installed ExFeed www.web-site.com и www.my-site.com.

You want to take links from www.my-site.com and to display it on www.web-site.com.

On www.web-site.com you have to add domain http://www.my-site.com to the "Getting List".

On www.my-site.com you have to add domain http://www.web-site.com to "Allow List".

That's all.

Title - this is head label for box in which will be display links.
Position - this is position box. The box could display in the left of the page or right.
Number - amount of links.
Status - status of domain.

ibs
05-17-2007, 03:36 PM
good work bro, excellent work will be testint it out as soon as i go live

fibonacc1
06-01-2007, 05:24 AM
Does this work also if I want to copy links from older versions to a site with new version 2.1.03? I have two web sites with versions well previous to 2.0 ...

Sergey Ten
06-01-2007, 06:25 AM
Hello and welcome to our support forum fibonacc1,

Yes, I think it will be work, but it necessary manually setting a script. If you want I could help you with that. Just let me know.

tsands
06-12-2007, 05:08 PM
Hi Sergey,

Question: this will only display the links, but won't actually copy them between directories, correct?

Sergey Ten
06-13-2007, 11:03 AM
Hello tsands,

Yes, you are right. It is like as RSS feed.

Norman Fernandez
07-11-2007, 10:31 AM
Will this feature be in the next version of the script! It would be a very nice feature to implement!

Sergey Ten
07-16-2007, 10:14 AM
Hello Norman Fernandez,

I think no.

Tamagochi
07-16-2007, 12:21 PM
Hi

If i have just one directory this may be ussefull to me??? Or I'll need two or more??

Anyway Sergey great work.

Best Regards

Sergey Ten
07-17-2007, 06:44 AM
Hi, Tamagochi!

No, you have to have 2 directories.

Tamagochi
07-17-2007, 09:31 AM
Hi,

Thanks anyway and greetings for your work again.

Best regards

Sergey Ten
07-17-2007, 09:42 AM
Tamagochi,

But you could exchange listings with another esyndicat directories. For example: if I have directory you grab for display my listing on your site and I could grab your listings.

Tamagochi
07-17-2007, 09:51 AM
Hi

Oh, it's true. Well if someone wants to exchange listings with me I'll be glad to do. Thanks Sergey I didn't think it.

Best regards

Sergey Ten
07-19-2007, 11:52 AM
You are welcome Tamagochi :)

tsands
08-01-2007, 08:42 AM
Is it possible to see this mod in action?