Go Back   PHP Link Directory Forum > PHP Link Directory (phpLD) > Mods and contribution Discussion

Mods and contribution Discussion This forum is only for discussion of modding phpLD. For specific mod releases, please see the appropriate forum.

Closed Thread
 
topic widgets
Old 03-01-2006   #1
Jappi
 
Join Date: Feb 2006
Location: Berlin
Posts: 5
Default [Mod] Add Statistics to Homepage

Hi,

I don't know, if anybody use tis small Mod.

{image broken and removed}

By this way, thanks to all people who develop mods and send tips.

Jappi

Sorry, that I announce myself only today

At first create a new File like "statistic.php", insert following Code:
Code:
Content visible to registered users only.
next open index.php and search for:

// Paging 4
$tpl->assign('list_total', count($count));
// End Paging 4

and insert Code below.

Code:
Content visible to registered users only.
Now you can use the 5 variables in your templates whereever you want.

For example in my left.tpl:

<p id="statistic">
<span class="statistic">
{$categorys}

{$subcategorys}


{$total_links}

{$pending_links}

{$today_links}

</span>
{l}Categorys:{/l}

{l}Subcategorys:{/l}

{l}Entries{/l}

{l}Total:{/l}

{l}Pending:{/l}

{l}Today:{/l}
</p>

If you want use this Layout, insert in your main.css:

#statistic {
margin: 0px;
padding: 13px;
border: 1px solid #8B008B;
font-size: 7pt;
line-height: 12px;
}
.statistic {
float: right;
font-weight: bold;
padding-right: 5px;
text-align: right;
}

Ok, have fun

I hope phpLD 3.0 use the same tablefields as 2.0

Jappi

Last edited by David; 08-17-2009 at 07:02 PM.
Jappi is offline  
Old 03-17-2006   #2
Jappi
 
Join Date: Feb 2006
Location: Berlin
Posts: 5
Default

Sorry, that I announce myself only today

At first create a new File like "statistic.php", insert following Code:
Code:
Content visible to registered users only.
next open index.php and search for:

// Paging 4
$tpl->assign('list_total', count($count));
// End Paging 4

and insert Code below.

Code:
Content visible to registered users only.
Now you can use the 5 variables in your templates whereever you want.

For example in my left.tpl:

<p id="statistic">
<span class="statistic">
{$categorys}

{$subcategorys}


{$total_links}

{$pending_links}

{$today_links}

</span>
{l}Categorys:{/l}

{l}Subcategorys:{/l}

{l}Entries{/l}

{l}Total:{/l}

{l}Pending:{/l}

{l}Today:{/l}
</p>

If you want use this Layout, insert in your main.css:

#statistic {
margin: 0px;
padding: 13px;
border: 1px solid #8B008B;
font-size: 7pt;
line-height: 12px;
}
.statistic {
float: right;
font-weight: bold;
padding-right: 5px;
text-align: right;
}

Ok, have fun

I hope phpLD 3.0 use the same tablefields as 2.0

Jappi
Jappi is offline  
Old 06-23-2006   #3
kentuckyslone
 
Join Date: May 2006
Posts: 69
Default

I am using 3.0.4 I could not locate

// Paging 4
$tpl->assign('list_total', count($count));
// End Paging 4

anywhere in index.php

Am I missing something or is this for a different version?
I would like to use this if I can make it work.

Thanks!
kentuckyslone is offline  
Old 06-24-2006   #4
neurosis4u
 
neurosis4u's Avatar
 
Join Date: Mar 2006
Location: Germany
Posts: 1,064
Default

i have it working with a little change...

instead of building a new php file called statistics.php i put the code for this file directly in index php, right above
echo $tpl->fetch('main.tpl', $id);
neurosis4u is offline  
Old 06-29-2006   #5
mrbadgolf
 
Join Date: May 2006
Posts: 94
Default

I cannot find that in 3.04 either
__________________
-------------------------
Mrbadgolf

Note to mrbadgolf: the links in your sig were removed because they were not working or incomplete. Feel free to re-add them when everything working okay again.
mrbadgolf is offline  
Old 06-29-2006   #6
neurosis4u
 
neurosis4u's Avatar
 
Join Date: Mar 2006
Location: Germany
Posts: 1,064
Default

look at the end of the file

//Make output
echo $tpl->fetch ('main.tpl', $id);
neurosis4u is offline  
Old 06-29-2006   #7
mrbadgolf
 
Join Date: May 2006
Posts: 94
Default

Im sorry, didnt make myself clear, I cannot locate

// Paging 4
$tpl->assign('list_total', count($count));
// End Paging 4

in the index.php file of 3.0.4
__________________
-------------------------
Mrbadgolf

Note to mrbadgolf: the links in your sig were removed because they were not working or incomplete. Feel free to re-add them when everything working okay again.
mrbadgolf is offline  
Old 07-06-2006   #8
CyberGrenade
 
Join Date: Jul 2006
Posts: 13
Default Thanks....

Thanks for the MOD. This opens up lots of doors. You can use this to get lots of data and display it on the main pages.

Thanks for the ideas.
__________________
I also enjoy photography.
CyberGrenade is offline  
Old 07-21-2006   #9
devilishqueen
 
devilishqueen's Avatar
 
Join Date: Jul 2006
Location: down under!!!!!!!!!
Posts: 14
Default

which folder should create that statistic.php file? root?
devilishqueen is offline  
Old 07-21-2006   #10
devilishqueen
 
devilishqueen's Avatar
 
Join Date: Jul 2006
Location: down under!!!!!!!!!
Posts: 14
Default

thanks.. but still.. i get the server error message.. :(

i tried to undo the changes i made.. and uploaded the file back.. but still.. the same error.. hpow can i get back from my directory without those smarty errors?
devilishqueen is offline  
Old 07-23-2006   #11
kentuckyslone
 
Join Date: May 2006
Posts: 69
Default

Is there a way to do this with 3.0.4?
kentuckyslone is offline  
Old 07-29-2006   #12
blogmaster2003
Supporter
 
Join Date: Jul 2006
Posts: 57
Default

Can someone explain what we have to do in the last phpld version so this mod can work?

Thank you
blogmaster2003 is offline  
Old 07-29-2006   #13
urlstand
 
urlstand's Avatar
 
Join Date: May 2006
Location: DHK.BD
Posts: 50
Default

how it works in latest version?
__________________

urlstand is offline  
Old 07-31-2006   #14
weblaunch
 
Join Date: Jul 2006
Posts: 5
Default

Hello,

How do modify the code to show number of links added in the "Last 7 days" rather than "Today"?

Thanks in advance!
weblaunch is offline  
Old 08-10-2006   #15
Nerz
 
Join Date: Aug 2006
Posts: 118
Default

Code:
Content visible to registered users only.
Mmm any luck?

Does anyone know if this works in 3.06 or has a solution.
Nerz is offline  
Old 08-24-2006   #16
Nerz
 
Join Date: Aug 2006
Posts: 118
Default

I can now confirm this works for 3.06, but this

Code:
Content visible to registered users only.
...does not exist. Simply add:

Code:
Content visible to registered users only.
Underneath:

Code:
Content visible to registered users only.
And its all fine.
Nerz is offline  
Old 09-08-2006   #17
LittleEarner
 
Join Date: Aug 2006
Posts: 37
Default

I have released a mod for phpLinkDirectory 2.0 and 3.0.5+. that allows you to show statistics on the front of your directory relating to the links and categories in the database. You can see what it looks like at http://www.moondirectory.co.uk.


The idea was originally by Jappi at phpLinkDirectory Forums. I have made a few changes in this version.
  • Added Featured Link Count.
  • Replaced Categories and Subcategories with a total category count.
  • Updated HTML to use DIV tags with stylesheets.
You can download the code and source needed to implement in the phpLD Statistics Mod section at DirectorySpy.com
__________________
PowerDosh.com - Home of phpLD Update Tool
LittleEarner is offline  
Old 09-08-2006   #18
Andy1961
Supporter
 
Join Date: Aug 2006
Location: London Ontario
Posts: 66
Default

Code:
Content visible to registered users only.
Hey bobby, I saw your site http://www.text-link-ads.com/ , unfortunately doesn't have a category "Photography".
Andy1961 is offline  
Old 10-28-2006   #19
MikeK
 
MikeK's Avatar
 
Join Date: Sep 2006
Location: Düsseldorf (Germany)
Posts: 396
Default

Thanks for this mod. It use it with v2.1!
__________________
Nun wieder mit PR5 ähm 0 Webkatalog | Bastelkatalog
MikeK is offline  
Old 10-29-2006   #20
jojomart
 
jojomart's Avatar
 
Join Date: Aug 2005
Location: Nova Scotia, Canada
Posts: 143
Wink Addition

The statistics weren't showing up on the details page, so I added the code to details.php as well:

require_once 'statistics.php';

right under:

require_once 'init.php';

So now the stats show up on the details page as well.

Joanne
jojomart is offline  
Closed Thread

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
topic widgets



All times are GMT +1. The time now is 05:56 PM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.