eSyndiCat User Forums esyndicat directory software esyndicat support

Go Back   eSyndiCat User Forums > eSyndiCat Directory Software [FREE] > User interface > Custom Templates

Custom Templates You have come up with a new really appealing template and keep silence? Why not share it with others. Somebody might love it.

Reply
 
Thread Tools Display Modes
Old 06-09-2006   #1
wyszukaj
 
Join Date: Apr 2006
Posts: 52
wyszukaj has disabled reputation
Default How to add php code?

Hello!

I need help for php code how can i add code for some page? like link-vault code or my special statistics code.

I need add this code for main page, category page and link-dispay page:

Code:
<?
include("robots_counter.php");
echo "
<div style='background-color:#ffffff;color:#000000;padding: 5px 5px 5px 5px;margin: 0px 0px

0px 3px;font-size:9px;font-weight:bold;'>Wizyty robotów na tej podstronie:</div>
<img src=google.jpg border=0 alt=Robot GoogleBot /> <b>$PageInfo[googlebot]</b><br />
<img src=msn.ico border=0 alt=Robot MSNbot /> <b>$PageInfo[msnbot]</b><br />
<img src=yahoo.jpg border=0 alt=Robot Yahoo! /> <b>$PageInfo[yahoo]</b><br />
";
?>
This is example screen for statistics efect:
http://www.skarpety.org/cat/Clip.jpg

And this is script files:
http://myth.org.ua/robots_counter.zip

Please help me!!!

BR
Tomek
wyszukaj is offline   Reply With Quote
Old 06-15-2006   #2
Nick Collins
Guest
 
Posts: n/a
Default

As I don't know exactly how this script works, the only thing I can advice that you should implement this code to esc php files, without "<?" and "?>" lines. You also should upload "robots_counter.php" file to the esc root directory.
  Reply With Quote
Old 06-19-2006   #3
wyszukaj
 
Join Date: Apr 2006
Posts: 52
wyszukaj has disabled reputation
Default

Hello Nick!

Thank you for your answer, i try to implement this in my site http://www.wyszukaj.com

I add this part of code [include("robots_counter.php");] in my index.php file and the robots is count. but i don't know were i must include next part of code to display robot count.

You can look on the site http://www.wyszukaj.com
wyszukaj is offline   Reply With Quote
Old 06-20-2006   #4
Vincent Wright
eSyndiCat Support Team
 
Join Date: Sep 2005
Posts: 1,421
Vincent Wright is an unknown quantity at this point
Default Adding robots counter

Greetings wyszukaj,

I think you have to complete two simple steps to make robot counters display in your directory.

1. Passing info to Smarty template engine

Open header.php file. At the bottom of the file (right before closing ?>) add this line:

PHP Code:
$gDirSmarty->assign_by_ref('PageInfo'$PageInfo); 
Save changes and close the file

2. Displaying statistics

Now open the file where you inserted the code you mentioned above (I suppose it is footer.tpl) and replace these entries

Code:
...
$PageInfo[googlebot]
...
$PageInfo[msnbot]
...
$PageInfo[yahoo]
...
with these

Code:
...
{$PageInfo.googlebot}
...
{$PageInfo.msnbot}
...
{$PageInfo.yahoo}
...
This is the correct syntax for displaying array elements in Smarty.

Save changes and close the file.

Visit your site and check if it works. Should you have any troubles with that feel free to ask.
Vincent Wright is offline   Reply With Quote
Old 06-20-2006   #5
Vincent Wright
eSyndiCat Support Team
 
Join Date: Sep 2005
Posts: 1,421
Vincent Wright is an unknown quantity at this point
Default Minor addition...

Please make sure the robots_counter.php is installed correctly.

It has installation instructions at the top. Though it is in poland I was able to understand that you have to create robot.db file and chmod it to 666 or 777 (write permissions). Also you have to require_once('robots_counter.php') in index.php
Vincent Wright is offline   Reply With Quote
Old 08-01-2009   #6
wyszukaj
 
Join Date: Apr 2006
Posts: 52
wyszukaj has disabled reputation
Default ver 2.2.06

Hi,

How to make this upgrade in version 2.2.0.6. i can't find header.php and can't find $gDirSmarty->assign_by_ref.

BR,
Tomek
__________________
My eSyndiCat directories:
Katalog stron
web katalog
wyszukaj is offline   Reply With Quote
Old 08-02-2009   #7
Bobby01
Paid Customer
 
Bobby01's Avatar
 
Join Date: Jul 2006
Location: http://www.krynica.malopolska.pl
Posts: 723
Bobby01 is on a distinguished road
Default

Quote:
Originally Posted by wyszukaj View Post
Hi,

How to make this upgrade in version 2.2.0.6. i can't find header.php and can't find $gDirSmarty->assign_by_ref.

BR,
Tomek
Tomasz
Clarification of the precise Vincent Wright wrote above.
You can add to the file header.php
PHP Code:
$gDirSmarty->assign_by_ref('PageInfo'$PageInfo); 
And do not look for this line of code :-))
POLISH
Wyjaśnienie dokładne napisał Vincent Wright,powyżej
Ty masz dopisać w pliku header.php tę linię gdyż jej nie ma
Na dole pliku (tuż przed zamknięciem?>)
esyndicat
has its own interesting solution :-) plugin name is: seo_stat
for download from the Customer Panel

Ufff
Pozdrawiam
__________________
Best Regards,
P.S. Sorry for my English. Bible ABC Admin Panel 2.3

Last edited by Bobby01; 08-03-2009 at 06:15 AM.
Bobby01 is offline   Reply With Quote
Old 08-03-2009   #8
Bobby01
Paid Customer
 
Bobby01's Avatar
 
Join Date: Jul 2006
Location: http://www.krynica.malopolska.pl
Posts: 723
Bobby01 is on a distinguished road
Exclamation

Quote:
Originally Posted by Vincent Wright View Post
Greetings wyszukaj,

........
Hellou Vincent
Can you help me,add others "exotic" search engine to modules seo_stat, company production
I mean this popular Polish search engine Like ONET, NETSPRINT,WP,szukacz

An example would be the one to help me in adding additional.Other users can view to korekt in its regional search engine
Best regards
__________________
Best Regards,
P.S. Sorry for my English. Bible ABC Admin Panel 2.3
Bobby01 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 11:50 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Testimonials | Articles | Support | Documentation | Privacy Policy | License | Affiliates | Contact Us | SEO Resources