1
ivistar
Help with top entries block
  • 2009/7/3 23:49

  • ivistar

  • Just popping in

  • Posts: 28

  • Since: 2008/12/14


Greetings my friends.

I need your help to modify the "top entries" block so that the comments made on any module don't count as entries.
How can I do this? What files do I edit?

Thanks.

2
culex
Re: Help with top entries block
  • 2009/7/4 9:03

  • culex

  • Module Developer

  • Posts: 711

  • Since: 2004/9/23


I think that would require some hacking. Why not just show top posters from for instance newbb, newbbex, etc :)
Programming is like sex:
One mistake and you have to support it for the rest of your life.

3
ivistar
Re: Help with top entries block
  • 2009/7/10 4:28

  • ivistar

  • Just popping in

  • Posts: 28

  • Since: 2008/12/14


I want to deactivate only the "comments" as posts... That doesn't work for the type of page I'm making, I want only the real entries to be counted (texts on smartsection and news) and not the comments. There must be some way to deactivate this... Can some XOOPS expert help me?

4
ivistar
Re: Help with top entries block
  • 2009/7/14 19:52

  • ivistar

  • Just popping in

  • Posts: 28

  • Since: 2008/12/14


Can some XOOPS expert help me?

5
Dylian
Re: Help with top entries block
  • 2009/7/14 20:11

  • Dylian

  • Friend of XOOPS

  • Posts: 237

  • Since: 2007/7/21


(I'm no expert but...) I don't think you can edit the block to only show the REAL posts.

I have a other solution for you but it will not remove the number of comments already made from the number of userposts. It will just not add a future comment to the number of userposts.

Here's my hack (I haven't tested it, so i don't know if it works...):
Open root/include/comment_post.php
On line 171, 211, 222 and 252 change
$add_userpost true;
to
$add_userpost false;

(Or just use search and replace to replace it everywhere )

This should work, if it doesn't just say it then i will search further.

Greets Dylian.

[edit]For deleting the number of comments from the total user posts a function could be created wich does something like:
<?php
//File: update_total_posts.php
//This doesn't realy work, it's just a example of how it would look like

include("mainfile.php"); //If you place it in the root
include(XOOPS_ROOT_PATH."/header.php");

$users getallusers(); //Doesn't exist
$totalposts gettotalposts(); //Doesn't exist
$totalcomments gettotalcomments(); //Doesn't exist

foreach ($users as &$user) {
 
$totalposts $totalposts $totalcomments;
 
updatedb($user$totalposts); //Doesn't exist}
}

include(
XOOPS_ROOT_PATH."/footer.php");
?>


Just a example .[/edit]
Dylian.eu | Webdevelopment
|http://dylian.eu |

Dylian Melgert | Home
|http://me.dylian.eu |

Arcus College Shedule Notification Service
|http://arcus.dylian.eu |

6
Dylian
Re: Help with top entries block
  • 2009/8/3 18:08

  • Dylian

  • Friend of XOOPS

  • Posts: 237

  • Since: 2007/7/21


Did it work??
Dylian.eu | Webdevelopment
|http://dylian.eu |

Dylian Melgert | Home
|http://me.dylian.eu |

Arcus College Shedule Notification Service
|http://arcus.dylian.eu |

Login

Who's Online

180 user(s) are online (95 user(s) are browsing Support Forums)


Members: 0


Guests: 180


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits