![]() |
| |||||||
| Mods and contribution Discussion This forum is only for discussion of modding phpLD. For specific mod releases, please see the appropriate forum. |
![]() |
| | Thread Tools | Display Modes |
| | #1 |
| Join Date: Feb 2006 Location: Berlin Posts: 6 | 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: <?PHP
//Statistik
$total_links = $db->GetOne("SELECT COUNT(*) FROM `{$tables['link']['name']}` WHERE `STATUS` = 2");
$tpl->assign('total_links', $total_links);
$pending_links = $db->GetOne("SELECT COUNT(*) FROM `{$tables['link']['name']}` WHERE `STATUS` = 1");
$tpl->assign('pending_links', $pending_links);
$today_links = $db->GetOne("SELECT COUNT(*) FROM `{$tables['link']['name']}` WHERE `DATE_ADDED` >= CURRENT_DATE");
$tpl->assign('today_links', $today_links);
$categorys = $db->GetOne("SELECT COUNT(*) FROM `{$tables['category']['name']}` WHERE `PARENT_ID` = 0 ");
$tpl->assign('categorys', $categorys);
$subcategorys = $db->GetOne("SELECT COUNT(*) FROM `{$tables['category']['name']}` WHERE `PARENT_ID` > 0 ");
$tpl->assign('subcategorys', $subcategorys);
//Ende Statistik
?> // Paging 4 $tpl->assign('list_total', count($count)); // End Paging 4 and insert Code below. Code: require_once 'statistic.php'; 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 08:02 PM. |
| |
| | #2 |
| Join Date: Feb 2006 Location: Berlin Posts: 6 | Sorry, i mean naturally, need and not to use. Simply Integration. Sorry for my bad english, look at my sign :roll: Jappi |
| |
| | #3 |
| Join Date: Sep 2005 Posts: 678 | i would use it if you could send the code __________________ Please check your sig links |
| |
| | #4 |
| Mentor Join Date: Feb 2006 Posts: 257 | yes, if you release a mod i think i will use it |
| |
| | #5 |
| Join Date: Feb 2006 Location: Berlin Posts: 6 | Sorry, that I announce myself only today At first create a new File like "statistic.php", insert following Code: Code: <?PHP
//Statistik
$total_links = $db->GetOne("SELECT COUNT(*) FROM `{$tables['link']['name']}` WHERE `STATUS` = 2");
$tpl->assign('total_links', $total_links);
$pending_links = $db->GetOne("SELECT COUNT(*) FROM `{$tables['link']['name']}` WHERE `STATUS` = 1");
$tpl->assign('pending_links', $pending_links);
$today_links = $db->GetOne("SELECT COUNT(*) FROM `{$tables['link']['name']}` WHERE `DATE_ADDED` >= CURRENT_DATE");
$tpl->assign('today_links', $today_links);
$categorys = $db->GetOne("SELECT COUNT(*) FROM `{$tables['category']['name']}` WHERE `PARENT_ID` = 0 ");
$tpl->assign('categorys', $categorys);
$subcategorys = $db->GetOne("SELECT COUNT(*) FROM `{$tables['category']['name']}` WHERE `PARENT_ID` > 0 ");
$tpl->assign('subcategorys', $subcategorys);
//Ende Statistik
?> // Paging 4 $tpl->assign('list_total', count($count)); // End Paging 4 and insert Code below. Code: require_once 'statistic.php'; 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 |
| |
| | #6 |
| Join Date: May 2006 Posts: 29 | Thanks a lot for this mod, I have used this for the statistics on my directory: http://ipage.info |
| |
| | #7 |
| Join Date: May 2006 Posts: 18 | many thanks, a complete script idiot like me got this up and running! |
| |
| | #8 |
| Supporter | bah! don't be so hard on yourself. Just think of it as not being versed enough(yet) __________________ DirectoryDump Web Directory | Link Directory | Full of Search Web Directory | Free phpLD Templates Last edited by David; 08-17-2009 at 08:02 PM. |
| |
| | #9 |
| Join Date: Sep 2005 Posts: 678 | yeah i once was terrible at scripting i am not really that good yet but hey i am coming along __________________ Please check your sig links |
| |
| | #10 |
| Join Date: May 2006 Posts: 66 | 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! |
| |
| | #11 |
| Moderator | 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); __________________ If you want to make me happy, send much money with PayPAl to: admin(@)ohneschufaweb.de Mein Spendenkonto ist bei PayPal zu erreichen: admin(@)ohneschufaweb.de http://www.ohneschufaweb.de |
| |
| | #12 |
| Join Date: May 2006 Posts: 89 | 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. |
| |
| | #13 |
| Moderator | look at the end of the file //Make output echo $tpl->fetch ('main.tpl', $id); __________________ If you want to make me happy, send much money with PayPAl to: admin(@)ohneschufaweb.de Mein Spendenkonto ist bei PayPal zu erreichen: admin(@)ohneschufaweb.de http://www.ohneschufaweb.de |
| |
| | #14 |
| Join Date: May 2006 Posts: 89 | 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. |
| |
| | #15 |
| Join Date: Jun 2006 Posts: 141 | Very coooooool mod!!! Super i'll use it for all my sites !!!!! __________________ Free PHPLD Templates at PHPLD Your Site Submit Your Sites: Irka Web Directory | The Squat Note to irka: a couple of links were removed because they were not working when we checked them |
| |
| | #16 |
| very nice mod. __________________ check your links - malware detected | |
| |
| | #17 |
| Supporter | I used this mod in new design I am making. It will be available for free at www.phpldtemplates.info I changed html code and css also to make better control of it. You can see work in progres here: http://img63.imageshack.us/img63/5756/screen0tr.gif Also tell me your homepage url so I can credit you on my site when I release this one. |
| |
| | #18 |
| Join Date: Jul 2006 Posts: 13 | 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. |
| |
| | #19 |
| which folder should create that statistic.php file? root? | |
| |
| | #20 |
| Join Date: Sep 2005 Posts: 678 | yeah in root __________________ Please check your sig links |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Alter the homepage | renfrompenn | Support (Version 2) | 2 | 03-22-2006 02:33 PM |
| Display total number of links on homepage? | john34 | Support (Version 2) | 10 | 02-25-2006 09:58 PM |
| Show mod only on homepage | ZOMP | Support (Version 2) | 2 | 01-09-2006 04:59 AM |
| Place you banner on my homepage permanently! =) | Nobody | PHPLD Community | 2 | 10-27-2005 12:11 AM |