4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 Dynamically creating forum stats (like this site)
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
toadeny
Junior WebHelper
Junior WebHelper


Joined: 11 Mar 2003
Posts: 7

PostPosted: Tue Mar 11, 2003 8:58 am (14 years, 7 months ago) Reply with QuoteBack to Top

Hi there, i have seen on various other sites, statistics that are like
taken from the database and displayed on one off the sites pages. for
example this site has a users and forum stats on the main page as you all may know. i was wondering if someone knew what type of code i need to extract from my ppbb files or even what the code used here is to
get this on my page. also i guess i can redo the code in the index.php and
other phpbb files so that the um stats and who is online sections are
worded differently?

if anyone has any idea on this can they please reply. i thank you for your time.
thanks
OfflineView User's ProfileFind all posts by toadenySend Personal Message
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Tue Mar 11, 2003 1:34 pm (14 years, 7 months ago) Reply with QuoteBack to Top

For the wording issue, simply edit templates/subSilver/index_body.tpl.

For the stats:

http://www.phpbb.com/mods/downloads/uploads/phpbb_fetch_info.txt

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
toadeny
Junior WebHelper
Junior WebHelper


Joined: 11 Mar 2003
Posts: 7

PostPosted: Wed Mar 12, 2003 4:58 am (14 years, 7 months ago) Reply with QuoteBack to Top

Once i installed that file and set it up with the correect db values i previewed it on my server. it said 'hacking attempt' i got a stat working, well some from moding the code. check it out.
http://www.chchwang.org.nz/new.php
i am going to add extra stuff to this and intend to put it on the sidebar of that site. i dont know what to do with that code. it says hacking attempt when i load it. any help is welcomed


Last edited by toadeny on Wed Mar 12, 2003 7:07 am, edited 1 time in total
OfflineView User's ProfileFind all posts by toadenySend Personal Message
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Wed Mar 12, 2003 6:59 am (14 years, 7 months ago) Reply with QuoteBack to Top

I can't access the URL you gave. But it doesn't surprise me you got a hacking attempt error. That security check was introduced in a more recent version of phpBB, and some scripts haven't taken it into account yet, thus producing the "hacking attempt" error.

All you need is to add this line to the top of any script producing that error:

Code:
define('IN_PHPBB', true);

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Wed Mar 12, 2003 2:47 pm (14 years, 7 months ago) Reply with QuoteBack to Top

I would appreciate not getting 5 PMs from you in half a day Wink There is an edit function which works until your PM is read Smile.

Anyway, could you please add the code I posted above to your PHP file, on the first line. That should solve the hacking attempt error.

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
toadeny
Junior WebHelper
Junior WebHelper


Joined: 11 Mar 2003
Posts: 7

PostPosted: Wed Mar 12, 2003 6:41 pm (14 years, 7 months ago) Reply with QuoteBack to Top

sorry for the pms. that code does not work. (it is already in that file you linked!)
it just returns the error

Hacking attempt

I don't know if you could, but it would be nice to have a list of the variables used and how to get them(from this sites main page stats) or even that code. thanks a lot.
OfflineView User's ProfileFind all posts by toadenySend Personal Message
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Wed Mar 12, 2003 6:52 pm (14 years, 7 months ago) Reply with QuoteBack to Top

I don't understand what's not working, since http://www.chchwang.org.nz/new.php seems fine. The list of variables, as you put it, is already with the script (http://www.phpbb.com/mods/downloads/uploads/phpbb_fetch_info.txt): newest_userid, total_posts, etc...

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot edit your posts in this forum.
You cannot delete your posts in this forum.
You cannot vote in polls in this forum.


Page generation time: 0.052502 seconds :: 17 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme