PDA

View Full Version : Advanced directory stats


reza1217
11-25-2008, 08:22 AM
Mod Title: Advanced directory stats

Last Updated: 24-11-2008

Supported by Mod Developer: No

Where to Download: This thread

Support Via This Thread or Download Site: This Thread

Compatible With: V3.3



I have implemented an advanced directory statistics which is an expansion to the default one. This shows the sites that were rejected along with a percentage of inclusion possibility. I believe it will help established directories to keep away unworthy/junk submission.

You can check out a demo at http://linkpls.com (http://linkpls.com/) the statistics box on the right side column.

You need to edit both source code and template file in order for this to function.

First open up init.php and find the following code:

Content visible to registered users only.And add below:
Content visible to registered users only. The above code will calculate the percentage of inclusion and pass it to smarty. However, the code shown here will calculate the percentage using the total sites submitted including sites that are pending. This is good for keeping those junk submissions away and sites that want to encourage people to buy featured listing instead. Remember, using this code will show a very low percentage if you have a lot of sites pending approval.

Optional: If you don’t want to include pending links and rather want to calculate the percentage using sites that are verified. Use the following code instead:

Content visible to registered users only. Now save and upload to replace the init.php file on your site.

Edit the template sidebar.tpl or wherever you have the stats code which might look like the following (This maybe different depending on the template you are using). You need to know a little about smarty, html and CSS to edit the file as the stats code are different in each template. The code I am using is as follows:

Content visible to registered users only. Add the following css to the style.css file in your templates/template_name/style/ folder. You can edit this code as you desire to change the look of your stats code.

Content visible to registered users only. Let me know what you guys think.

David
11-27-2008, 10:58 PM
Post approved. Thanks for the addition.

freedir
11-28-2008, 02:22 PM
Got this one working!! Take a look...

It´s good! Thank you!

www free-dir net

[bt]

bruleo
11-28-2008, 02:34 PM
Nice one. Did this myself before, but dropped it as I was tending to insert links into empty spaces where other links had previously been rejected, which messed up the stats, but very useful for people that don't do that.

If anyone is interested, got a whole lot more stats that can be added to enhance it even further: Example here: http://www.sportindexer.com/stats.php.

PM me.

Bruce.

freedir
11-28-2008, 11:32 PM
Hi,
Well i want a page like that! Can i have all codes?

Best regards

Feydakin
12-05-2008, 02:19 AM
Awesome, exactly what I was looking for..

jnadler
12-09-2008, 07:50 PM
Excellent mod.

Thanks

Free Web Directory -Link Exchange Systems (http://www.linkexchangesystems.com)

wereld
12-09-2008, 08:55 PM
Thanks, it is working perfect.

http://www.primalink.nl

mohammad
01-21-2009, 12:48 PM
Very very good mod! tnx

ardo
02-05-2009, 02:07 PM
Vary Nice I'm using it on my site http://www.runfatcat.com/, Thank you vary much!

David M.

genious
02-05-2009, 11:34 PM
very nice ... :)


good looking

shooter
03-06-2009, 11:44 AM
very nice mod... thx reza1217
i have this build in -> www.spielebot.de (http://www.spielebot.de)

cu shooter

yoteun
04-17-2009, 08:41 PM
is it tested and working on version 2?

shadav
04-17-2009, 08:58 PM
it should work on v2, aside from the articles part, since that doesn't come with v2 :)

yoteun
04-17-2009, 08:59 PM
Ok thanks i go to try if i can get it on my site ;)
Thanks for the topic and answer!

Greetings :)

yoteun
04-22-2009, 04:51 PM
First open up init.php and find the following code:


PHP Code:
$stats['statSubCategories'] = $db->GetOne("SELECT COUNT(*) FROM `{$tables['category']['name']}` WHERE `PARENT_ID` <> '0'");


And add below:

PHP Code:
$stats['statPendingArticles'] = $db->GetOne("SELECT COUNT(*) FROM `{$tables['article']['name']}` WHERE `STATUS` = '1'");
$stats['statTodaysArticles'] = $db->GetOne("SELECT COUNT(*) FROM `{$tables['article']['name']}` WHERE `DATE_ADDED` LIKE '".date ('Y-m-d', TIMENOW)."%'");
$stats['statTotalLinks'] = $db->GetOne("SELECT Max(ID) FROM `{$tables['link']['name']}` WHERE `STATUS` > '0'");
$stats['statTotalRefused'] = $stats['statTotalLinks'] - $stats['statActiveLinks'];
$stats['statAccept'] = round(100 - ($stats['statTotalRefused']/$stats['statTotalLinks'])*100, 2);



I had searched in the init.php for the place where to input this code.
But i can't find the code there.
Someone can help me with it?

Thanks!

shadav
04-22-2009, 05:45 PM
:) sorry wasn't thinking about that....as stats aren't built into v2

for v2 i would suggest using any one of the stats mods listed in the forums or you can go to http://www.shadav.info/mods.php and
Content visible to registered users only.then after you have set up a standard stats mod installing reza's advanced stats part

yoteun
04-22-2009, 05:49 PM
ok thanks for answering!

shadav
04-22-2009, 06:08 PM
I just quickly added this onto my test v2, though I did have to alter it to make it work, if you would like pm me and i'll send you the instructions for adding the stats mod + this mod that i have done here > templates.talkhost.info/phpLD/2/
or send me your ftp info and where you want the stats mod at and I can add it quickly for you...though you'll have to play with it to make it styled the way you want it ;)

yoteun
04-26-2009, 07:40 PM
i had send you a pm and answer :)
Thanks!

shadav
04-27-2009, 02:56 AM
sent you the altered version to work with the stats mod i use for v2

yoteun
04-27-2009, 09:22 AM
Thank you it works [bt]

Greetings :)

alexito
05-27-2009, 04:18 PM
it works on 3.2.0?
thx

shadav
05-28-2009, 03:04 AM
question,....just noticed today :)
shouldn't
Content visible to registered users only.
be
Content visible to registered users only.

i have a pending link and it was showing as it was added today...

yoteun
06-03-2009, 04:55 PM
lol here i am again :)
I had changed the layout and want to have the stats at the site, but i can't find the style map.

What can i do now?
sorry for asking again.

Greetings Yoteun

alexito
06-06-2009, 01:18 PM
works with 3.2.0?¿??

Christian
06-06-2009, 08:16 PM
Hi thank you for the mod, it works also by 3.4... with a little "change" ;)

Greetings from swiss
Christian

m23perrault
06-17-2009, 07:30 PM
I like it, i will be adding it :)