PDA

View Full Version : DevBox Work - Online Users Today, Latest Threads, Top Posters, Newest Members


Chroder
03-28-2004, 10:00 PM
This is another one of my 'all in one' hacks, this time without the 'latest posts' part.

Features





Turn on/off each option. An individual setting
Alter the amount of rows to retrieve (ie. only get 10 recent threads)
Easy access to used SQL queries, so advanced users can alter the SQL to get extra information.
Uses phrase system
Fully customizable templates
Latest Threads can be from only forums you specify, or from forums that the current user has permission to see. Deleted threads are not shown.
Online Users Today shows invisible marks to those who can see them, and shows open/close tag (ie. admins are bold and italic).
Dates uses vbdate function, which uses your date string in vboptions
Installer for phrases and templates!
+ more
Support
I can offer limited support for this hack. I wrote it for my forum, and its workin' pretty good. If you find any problems, post'em here and I might find some time to help you out. Just back up all your data before you apply anything, as goes with all hacks!

Demo
Online demo (with some template edits, I might add!): http://www.DevBoxForums.com

Notes
I didn't have the time to edit the default templates, so I don't think it's too pleasing out-of-the-box. If someone would like to spice it up a notch and submit it here, I'd be glad to include it in the actual package.

Installation
Upload devbox_work.php to your forum root path, as well as the devbox_install directory. Navigate your browser to devbox_install/install.php and follow onscreen instructions. You will need your database username and password simply for authentication to start the installer.

Should I install this hack? Is it buggy? Etc
I've been making the installer for a little while and I must've run it at least a dozen times throughout and I haven't had any errors. But thats only me. Before people can install it for themselves and see how it goes, I can't say much.

Troubleshooting / Common Problems
If you end up running the phrase step or template step more then once, you'll probably get mysql errors complaining about duplicate entries. You can go in phpMyAdmin into the phrase/template tables, sort by the primary key so oldest is first, and delete all the devbox related rows.


Template Variables
Since this hack is obviously lacking some default-template looks, I thought I'd go over all of the variables you can use. If you want more, you'll have to edit the SQL queries under 'Section 2'. All variables are accessed through the $data array. Example: $data[threadid]



Latest Threads

threadid - The ThreadID. Used in URL's mostly
title - Thread title
replycount - The number of replies the thread has
views - The number of views the thread has
lastposter - The username of the last poster
posterusername - The username of the thread starter
posteruserid - The UserID of the thread starter
forumid - The ForumID of the the forum the thread resides in
forumtitle - The forum name the thread resides in

Newest Members



userid - The UserID of the member. Usually used in URL's
username - The username of the member
date - The readable joindate of the user. If for some reason you wanted the timestamp, use joindate
posts - The number of posts this member has
opentag/closetag - The open/close HTML tags for this member. (ie. Admins are generally bold and italic)

Top Posters



userid - See above
username - See above
posts - See above
opentag/closetag - See above

Online Today



userid - See above
username - See above
invisible - The invisible mark shown next to invisible users. Set to '*' to members that are hidden users, and set to '' (nothing) to those who are not. Note: Hidden users are only shown on the list if the user viewing the page has permission to see them.
opentag/closetag - See above

Attachments





devbox_work.zip contains all the files neede
installer.gif is a screenshot of the install script

???`S?LV?R???`
03-29-2004, 04:36 AM
nice job

Dean C
03-29-2004, 10:09 AM
Looks great on your site :)!

Chroder
03-29-2004, 08:51 PM
Thanks guys. Just editted my first post and included a little 'template variable overview'.

NyCwill
03-30-2004, 02:27 AM
ehh there doesnt seem to be anything on the zip

Chroder
03-30-2004, 04:03 PM
There i when I download it...

Codeman05
04-01-2004, 03:09 PM
any chance you could give me a hand getting the new tables onto the right like on your site?

Great hack btw!

dethfire
04-04-2004, 09:48 PM
for some reason this displays on the bottom, is it supposed to?

Chroder
04-04-2004, 09:53 PM
Out-of-the-box, yes. You'll have to modify the templates on your own if you want it to look like mine (On the side, that is). If I have time I'll write an addon that will make the side bar.

dethfire
04-04-2004, 10:01 PM
I call false advertising!! :disappointed:

Chroder
04-04-2004, 10:09 PM
It would be too confusing to write instructions for the default look :p

higabyte
04-07-2004, 03:49 PM
this is great, thanks!!! very easy installtion too! no problems at all

LadyBeth
04-07-2004, 09:09 PM
I thought I was going to get through this just fine, then I went to my devbox_work.php to look at it after installation and I got this:

Warning: array_keys(): The first argument should be an array in /home/pwna1b/wwwroot/pwnabbs.org/devbox_work.php on line 81

Warning: Invalid argument supplied for foreach() in /home/pwna1b/wwwroot/pwnabbs.org/devbox_work.php on line 81

Fatal error: Call to a member function on a non-object in /home/pwna1b/wwwroot/pwnabbs.org/devbox_work.php on line 180

I'm new, be gentle, can someone please help me out?
Beth :(

anabolicedge
04-08-2004, 06:33 AM
i'll def install if you can show us how to make it on the side like ur site :)

Chroder
04-09-2004, 02:08 AM
I thought I was going to get through this just fine, then I went to my devbox_work.php to look at it after installation and I got this:

Warning: array_keys(): The first argument should be an array in /home/pwna1b/wwwroot/pwnabbs.org/devbox_work.php on line 81

Warning: Invalid argument supplied for foreach() in /home/pwna1b/wwwroot/pwnabbs.org/devbox_work.php on line 81

Fatal error: Call to a member function on a non-object in /home/pwna1b/wwwroot/pwnabbs.org/devbox_work.php on line 180

I'm new, be gentle, can someone please help me out?
Beth :( At the time, did you only have one forum or did your username only have access to one forum? Not sure why this is happening. Try specifying the sprecific forumid's in the config. To find a forumid, put your mouse over a link and look for f=##, ## is the forum id. You can get the forum id's of the forums and stick them into the forum_ids config value at the top of devbox_work.php. Here's an example config value:

$devbox_config = array( 'latest_threads' => 'on',
'latest_threads_num' => 10,

'newest_members' => 'on',
'newest_members_num' => 5,

'top_posters' => 'on',
'top_posters_num' => 5,

'online_today' => 'on',

'forum_ids' => '1,4,8,17,19,20,23',
);
Notice the modified 'forum_ids' value.

Chroder
04-09-2004, 02:09 AM
i'll def install if you can show us how to make it on the side like ur site :) I'll try and get around to it, I'm extremely busy trying to program my main site.

LadyBeth
04-09-2004, 11:27 AM
I got it thanks...it was a newbie error. Successfully installed and loving it! Now if I can get the php issues resolved in the Arcade I'm installing...all will be right on the net. ;)

Cyn
04-09-2004, 11:39 AM
Chris, would this work okay with AdColumns v1.0 (https://vborg.vbsupport.ru/showthread.php?t=62348) on one side and your hack installed for the other side?

higabyte
04-11-2004, 09:04 PM
it should work, i just used the regular old sidebar hack and extracted the dev hacks from the forumhome template and inserted them into the sidebar template... pretty simple...

here is a view, i just did it so I still have a little formatting/tweaking to do...

http://board.accordtuner.com/index.php

starfantazy
04-22-2004, 10:06 PM
Is this my first post? Anyways, I have so many problems with installing these so I hope that I can install this one. :nervous:

Pitman
05-11-2004, 12:40 AM
Is there anyway to exclude certain usergroups from the top posters?

streetfighter
05-13-2004, 01:20 PM
Well,

whever i call the devbox_work.php file: I GET FOLLWING ERROR:

Warning: array_keys(): The first argument should be an array in /home/indiangu/public_html/devbox_work.php on line 81
Warning: Invalid argument supplied for foreach() in /home/indiangu/public_html/devbox_work.php on line 81
Fatal error: Call to a member function on a non-object in /home/indiangu/public_html/devbox_work.php on line 180


As per ur suggestion in earlier posts, i have to give individual forum ids in config file, which i did, but still not effect.

here is my config file:


<?php
// +-----------------------------------------------------------------------------+
// | devbox_work.php |
// +-----------------------------------------------------------------------------+
// | Written by Christopher Nadeau |
// | - www.DevBox.net, www.DevBoxForums.com [chris@devbox.net] |
// +-----------------------------------------------------------------------------+
// | Copyright 2004 by Christopher Nadeau |
// +-----------------------------------------------------------------------------+
// | RELEASED UNDER THE EvB license: |
// | => Standard Attribution |
// | => Limited Derivs |
// | => Limited Translation |
// | MORE INFO HERE: |
// | => http://www.everythingvb.com/licenses/sa-ld-lt/1.0/ |
// +-----------------------------------------------------------------------------+
// | TABLE OF CONTENTS |
// | 1. CONFIGURATION: Config area, you should edit this area. |
// | |
// | 2. INTERPRETATION: Handles config, you should NOT edit ths area. |
// | |
// | 3. ADV. CONFIGURATION: Edit the SQL to use. You should only edit this |
// | area if you know what your doing. |
// | |
// | 4. SCRIPT: The actual script. You should NOT edit this area. |
// | |
// | 5. MISC: Misc functions. You should NOT edit this area. |
// +-----------------------------------------------------------------------------+

/************************************************** *******************************
1. CONFIGURATION
Each configuration value can be set to 'on', 'off', 1, 0, true or false.
=> 'on' - Activated
=> 'off' - Deactivated
=> 1 - Activated
=> 0 - Deactivated
=> true - Activated
=> false - Deactivated

*_*_num: the number of values to retrieve.

forum_ids: the forumid's of the forums you want to grab the latest threads
from. You can set this to 'auto' to include all forums that the
user has permission to see. Serparate each with a comma. Ex:
- '1,8,19,20'
- 'auto'
************************************************** *******************************/
$devbox_config = array( 'latest_threads' => 'on',
'latest_threads_num' => 10,

'newest_members' => 'on',
'newest_members_num' => 5,

'top_posters' => 'on',
'top_posters_num' => 5,

'online_today' => 'on',

'forum_ids' => '2,6,16,7,14,5,18,9,10,11,13,15',
);





/************************************************** *******************************
2. INTERPRETATION
This section just interprets the config options, and ensures they're alright.
You should skip this section and go onto #3 if you want.
************************************************** *******************************/
// Ensure all the right numbers are in place
$devbox_config['latest_threads_num'] = (int) $devbox_config['latest_threads_num'];
$devbox_config['newest_members_num'] = (int) $devbox_config['newest_members_num'];
$devbox_config['top_posters_num'] = (int) $devbox_config['top_posters_num'];

// Handle forum id's
if($devbox_config['forum_ids'] == 'auto')
{
$devbox_config['forum_ids'] = array();

foreach(array_keys($forumcache) AS $forumid)
{
$fp = &$bbuserinfo['forumpermissions']["$forumid"];
if ($fp & CANVIEW AND $fp & CANVIEWOTHERS)
{
$devbox_config['forum_ids'][] = $forumid;
}
}

$devbox_config['forum_ids'] = implode(',', $devbox_config['forum_ids']);
unset($fp);
}

$TP = TABLE_PREFIX;





/************************************************** *******************************
3. ADVANCED CONFIGURATION
These config values define what SQL should be used to grab the info from the
database. Don't touch these if you don't know what your doing! You have
to change these if you want information other then what is already
provided. Use the variable $TP for table prefix if you don't want to get out
of the quotes.
************************************************** ********************************/
$devbox_config['latest_threads_sql'] = "### devbox_work.php - grabbing latest threads ###
SELECT
t.threadid, t.title, t.replycount, t.views, t.lastposter, t.postusername, t.postuserid,
f.forumid, f.title AS forumtitle
FROM
{$TP}thread t,
{$TP}forum f
LEFT JOIN {$TP}deletionlog AS del ON (del.primaryid = t.threadid AND del.type = 'thread')
WHERE
f.forumid = t.forumid
AND f.forumid IN({$devbox_config['forum_ids']})
AND t.visible = 1
AND del.primaryid IS NULL
ORDER BY t.threadid DESC
LIMIT {$devbox_config['latest_threads_num']}";


$devbox_config['newest_members_sql'] = "### devbox_work.php - grabbing newest members ###
SELECT
u.userid, u.username, u.joindate, u.posts,
g.opentag, g.closetag
FROM
{$TP}user u,
{$TP}usergroup g
WHERE
g.usergroupid = u.usergroupid
ORDER BY u.userid DESC
LIMIT {$devbox_config['newest_members_num']}";

$devbox_config['top_posters_sql'] = "### devbox_work.php - grabbing top posters ###
SELECT
u.userid, u.username, u.posts,
g.opentag, g.closetag
FROM
{$TP}user u,
{$TP}usergroup g
WHERE
g.usergroupid = u.usergroupid
ORDER BY u.posts DESC
LIMIT {$devbox_config['top_posters_num']}";

$devbox_config['online_today_sql'] = "### devbox_work.php - grabbing online today ###
SELECT
u.userid, u.username, (u.options & {$_USEROPTIONS['invisible']}) AS invisible,
g.opentag, g.closetag
FROM
{$TP}user u,
{$TP}usergroup g
WHERE
g.usergroupid = u.usergroupid AND
u.lastactivity >= " . (mktime(0, 0, 0) + (($bbuserinfo['timezoneoffset'] - $vboptions['timeoffset']) * 3600)) . "
ORDER BY u.username ASC";





/************************************************** *******************************
4. SCRIPT
You shouldn't need to edit anything below this!
************************************************** *******************************/

$devbox = array('latest_threads' => '',
'newest_members' => '',
'online_today' => '',
'top_posters' => '',
);

//--------------------------------------------------------------------------------
// Grab the 'latest threads'
if(isOn('latest_threads'))
{
$devbox_latest_threads = $DB_site->query($devbox_config['latest_threads_sql']);
$devbox_config['latest_threads_num'] = $DB_site->num_rows($devbox_latest_threads);
$devbox_counter = 0;

if($devbox_config['latest_threads_num'] < 1)
{
$devbox['latest_threads'] = 'No threads.';
}

else
{
while($data = $DB_site->fetch_array($devbox_latest_threads))
{
$data['counter'] = ++$devbox_counter;
eval('$devbox[\'latest_threads\'] .= "' . fetch_template('devbox-latest_threads_bit') . '";');
}
}

$DB_site->free_result($devbox_latest_threads);
unset($devbox_latest_threads, $devbox_counter, $data);
}

//--------------------------------------------------------------------------------
// Grab the 'lastest members'
if(isOn('newest_members'))
{
$devbox_newest_members = $DB_site->query($devbox_config['newest_members_sql']);
$devbox_config['newest_members_num'] = $DB_site->num_rows($devbox_newest_members);
$devbox_counter = 0;

while($data = $DB_site->fetch_array($devbox_newest_members))
{
$data['counter'] = ++$devbox_counter;
$data['date'] = vbdate($vboptions['dateformat'], $data['joindate'], false, true, false);
eval('$devbox[\'newest_members\'] .= "' . fetch_template('devbox-newest_members_bit') . '";');
}

$DB_site->free_result($devbox_newest_members);
unset($devbox_newest_members, $devbox_counter, $data);
}

//--------------------------------------------------------------------------------
// Grab the 'online today'
if(isOn('online_today'))
{
$devbox_online_today = $DB_site->query($devbox_config['online_today_sql']);
$devbox_counter = 0;

while($data = $DB_site->fetch_array($devbox_online_today))
{
$data['counter'] = ++$devbox_counter;

if($data['invisible'])
{
if(!($permissions['genericpermissions'] & CANSEEHIDDEN))
continue;
else
$data['invisible'] = '*';
}

else
$data['invisible'] = '';

eval('$devbox[\'online_today\'] .= "' . fetch_template('devbox-online_today_bit') . '";');
$devbox['online_today'] .= ', ';
}

$devbox['online_today'] = substr($devbox['online_today'], 0, (strlen($devbox['online_today']) - 3));
$devbox['online_today_num'] = $devbox_counter;

$DB_site->free_result($devbox_online_today);
unset($devbox_online_today, $devbox_counter, $data);

////////////////////

if(!isset($datastore['maxonlinetoday']))
{
$devbox['online_today_max'] = $devbox['online_today_num'];
$devbox['online_today_maxwhen'] = mktime();

$devbox_ot['online_today_max'] = $devbox['online_today_max'];
$devbox_ot['online_today_maxwhen'] = $devbox['online_today_maxwhen'];
$devbox_ot = serialize($devbox_ot);

$DB_site->query("### devbox_work.php - insert online today into datastore ###
INSERT INTO {$TP}datastore (title, data) VALUES ('maxonlinetoday', '$devbox_ot')");
}

else
{
$devbox_ot = unserialize($datastore['maxonlinetoday']);
if($devbox_ot['online_today_max'] < $devbox['online_today_num'])
{
$devbox['online_today_max'] = $devbox['online_today_num'];
$devbox['online_today_maxwhen'] = mktime();

$devbox_ot['online_today_max'] = $devbox['online_today_max'];
$devbox_ot['online_today_maxwhen'] = $devbox['online_today_maxwhen'];
$devbox_ot = serialize($devbox_ot);

$DB_site->query("### devbox_work.php - update online today ###
UPDATE {$TP}datastore SET data='$devbox_ot' WHERE title='maxonlinetoday'");
}

else
{
$devbox['online_today_max'] = $devbox_ot['online_today_max'];
$devbox['online_today_maxwhen'] = $devbox_ot['online_today_maxwhen'];
}
}

$devbox['online_today_maxwhen'] = vbdate($vboptions['dateformat'], $devbox['online_today_maxwhen'], true, true, false);
unset($devbox_it);
}

//--------------------------------------------------------------------------------
// Grab the 'top posters'
if(isOn('top_posters'))
{
$devbox_top_posters = $DB_site->query($devbox_config['top_posters_sql']);
$devbox_config['top_posters_num'] = $DB_site->num_rows($devbox_top_posters);
$devbox_counter = 0;

while($data = $DB_site->fetch_array($devbox_top_posters))
{
$data['counter'] = ++$devbox_counter;
eval('$devbox[\'top_posters\'] .= "' . fetch_template('devbox-top_posters_bit') . '";');
}

$DB_site->free_result($devbox_top_posters);
unset($devbox_top_posters, $devbox_counter, $data);
}





/************************************************** *******************************
5. MISC
Misc functions. You shouldnt edit this area.
************************************************** *******************************/
// check if config value to see if we should do something or not
function isOn($what)
{
global $devbox_config;

if(!isset($devbox_config["$what"]))
return false;

$val = $devbox_config["$what"];

if(is_string($val))
$val = strtolower($val);

if($val === 'on' OR $val === 1 OR $val === true)
{
$devbox_config["$what"] = true;
return true;
}
else
{
$devbox_config["$what"] = false;
return false;
}
}

?>


I hope some quick solution is given to me.

Thanks.

paulomt1
05-13-2004, 05:39 PM
I have istalled the hack but it not show like in your page???
I see the box's in the buttom not in the right of screen.

moonclamp
05-18-2004, 11:38 PM
I am getting this error, I tried defining the forum numbers manually instead of 'auto' and that made no difference:

Fatal error: Call to a member function on a non-object in /domains/domainname-com/domainname/www_root/devbox_work.php on line 180

WoodiE
08-01-2004, 06:24 PM
Has the recent errors been fixed? What about making this show on the right hand side, I'd be very interested in this hack if instructions where provided to make it show on the right side.

Wapture
08-02-2004, 04:15 PM
I really need help with this, when I go to devbox_work.php it doesn't work but shows an error. Please help!

apokphp
08-03-2004, 12:03 AM
I'm getting an error similar to one mentioned before...unfortunately, that poster never provided the correction, so I don't know what I'm doing wrong here. I did get the same error, but I input the specific forum ID's, and it got rid of 2 errors.

I'm left with:
Fatal error: Call to a member function on a non-object in /home/myfamily/public_html/forums/devbox_work.php on line 180

My dev site: www.myfamilycorner.net/forums/

What would cause this error? This is my config:


$devbox_config = array( 'latest_threads' => 'on',
'latest_threads_num' => 10,

'newest_members' => 'on',
'newest_members_num' => 5,

'top_posters' => 'on',
'top_posters_num' => 5,

'online_today' => 'on',

'forum_ids' => '2,3,4',
);

jamesk
08-03-2004, 06:53 PM
does the forumid # have to reflect exzaclty like on the site or can i provide 1, through 300;?

Henry-RS
08-03-2004, 09:25 PM
Can I get a screen shot of the dullness that is this hack's default display?

apokphp
08-04-2004, 09:13 AM
This doesn't update the "latest threads" when someone posts in a thread...it only updates the list of actual new threads. How can we set it, so that it displays the threads w/ the latest posts?

WoodiE
08-05-2004, 02:03 AM
Chroder - Any update on getting the directions out for making this display on the right side of the page instead of the bottom?

apokphp
08-06-2004, 04:34 PM
I combined this hack with a better sidebar hack from vbulletintemplates.com and the Xstats hack from here (just for the most recent posts).

I installed the other sidebar (which only adds the sidebar on the forumhome, and nowhere else -- unlike this hack), and then copied the code for stats into the "custom cell space" that the other sidebar hack comes with. It was easy. You can check out the results here: www.onlinedebate.net/forums/

I still had to install this hack, but not the templates. Also, the devbox_work.php file still won't work as it is supposed to, so you'll have to modify that via ftp manually. As you can see, the result is fine. ;)

paulomt1
08-06-2004, 04:59 PM
Out-of-the-box, yes. You'll have to modify the templates on your own if you want it to look like mine (On the side, that is). If I have time I'll write an addon that will make the side bar.

I will wait for it, since I don't like the box at bottom.

apokphp
08-06-2004, 07:19 PM
....see post #32.

Henry-RS
08-08-2004, 08:41 PM
....see post #32.

What other sidebar are you talking about?

apokphp
08-08-2004, 08:55 PM
<a href="http://www.vbulletintemplates.com/mods/showthread.php?t=6478&highlight=sidebar" target="_blank">http://www.vbulletintemplates.com/mo...hlight=sidebar</a>

For those who only want a sidebar on the FORUMHOME, not all pages.

paulomt1
08-08-2004, 10:04 PM
http://www.vbulletintemplates.com/mods/showthread.php?t=6478&highlight=sidebar

For those who only want a sidebar on the FORUMHOME, not all pages.

Yes, but I need register first for I can download it, I will not register only for download this hack, I'm still waiting...

apokphp
08-08-2004, 10:15 PM
...not getting the solution to your problem because you do not want to register on a site? The "problem" must not be that big of a problem afterall. ;)

btw, vbulletintemplates has a lot of members/hackers who participate here at vb.org. It has several mods/hacks/styles for vb. I suppose I can understand about having to register, but IMO, it's a very small price to pay, and it is a legitimate reason to register (they don't want just anyone leeching files).

Also, the support on this particular hack, is non-existent. Me thinketh you'll be in for a very long wait (if the author even gets around to updating it)...meanwhile...those who did just a little extra work...have this hack looking and functioning perfectly (with the sidebar). ;)

paulomt1
08-09-2004, 08:49 AM
Why should i register in another forum that was part of vbulletin.com, 1 registry is not enough?
What is the interest of having a lot of registered people only for static’s, sorry I don't understand.
I can't find nothing useful in this forum that is worth registering for.

The screenshot of this hack should have box's at bottom so that people could see exacly how it looks like. It shouldn't be as it is because when people install this hack they don't see what they were expecting.

Thanks for your help anyway ;-)

apokphp
08-09-2004, 05:30 PM
Oh, I agree that this installed hack misleads many people (but I don't think the author did it on purpose). I also agree, that any "official" vbulletin site, ought to be setup to use 1 login. But I don't think that is possible due to using different db's. The resources/size would cause a lot of lag I believe.

That being said, there are SOME who really think that the way the author of this hack has it setup on his board, is great, and we want it now. For those who really do want this, there IS a way to do it, and do it now w/o waiting. That way just requires a 30 second registration and a combination of 2 hacks.

Like I said...I offer this solution to only to those who really do want this hack right away because it really is, a great looking, great working feature to the forum. ;)

devilsmania
08-20-2004, 08:20 PM
I got it thanks...it was a newbie error. Successfully installed and loving it! Now if I can get the php issues resolved in the Arcade I'm installing...all will be right on the net. ;)



how did you fix that ? i got the same error

fiber1
08-21-2004, 05:41 AM
I have this set-up on the right side, here is the link to see.

Click here (http://www.masteringthemarkets2.com/forum/index.php).

Not that hard really.

Fiber

Mr. Brian
08-27-2004, 12:55 PM
Werid. Everything should works fine but when I run "devbox_work.php" I get those phrase error.

sirblack
08-30-2004, 06:06 AM
Hi duno if any one has had this i installed the hack as the instrutions said and leaft every thing default all installed fine said it was ok but its not there and not showing in admin cp ither any idears guys

all the best sirblack

Wapture
09-18-2004, 09:11 AM
Please can someone make the instructions to add this to the right side of the forum?

I really would like it there, but can't do it...

Thanks

fiber1
09-18-2004, 03:30 PM
Use the Adcolums hack or use the sidebar template mods over at VBTemplates.com. Then just move your code into the sidebar.

Wapture
09-21-2004, 09:28 PM
Can someone please install this for me on the right hand or left hand side of my forum?

$10 to the one who will...

Dyavin
09-28-2004, 07:51 AM
smooth install, works well. one problem with paths, but i fixed it.

nansy
10-26-2004, 03:06 AM
what is the problem :(


$devbox_config = array( 'latest_threads' => 'on',
'latest_threads_num' => 10,

'newest_members' => 'on',
'newest_members_num' => 5,

'top_posters' => 'on',
'top_posters_num' => 5,

'online_today' => 'on',

'forum_ids' => '2,3,5,6',
);


and i have error in line 180 !!!

how i can fix this problem

thanks

nansy
10-26-2004, 05:19 PM
what is the problem in line 180 !!!
up

Rick Sample
10-30-2004, 10:51 AM
Out-of-the-box, yes. You'll have to modify the templates on your own if you want it to look like mine (On the side, that is). If I have time I'll write an addon that will make the side bar.

I have done this for you all.

First in FORUMHOME find:
$navbar

After add:
<!--*** \/ COLUMN SETUP \/ ***-->
<table cellspacing="0" cellpadding="0" width="100%"><tr><td valign="top">
<!--*** /\ COLUMN SETUP /\ ***-->

2nd in forumhome find:
<!-- / icons and login code -->

After add:
<!--*** \/ COLUMN SETUP \/ ***-->
</td><td valign="top" width="220" style="padding-left: 10px;">
<!--*** /\ COLUMN SETUP /\ ***-->
<!-- DEVBOX LATEST THREADS -->
<table class="tborder" cellpadding="6" cellspacing="1" width="100%">
<tbody>
<tr>
<td class="thead">
<a style="float:right" href="#top" onclick="return toggle_collapse('devbox_latest_threads')"><img id="collapseimg_devbox_latest_threads" src="db_style/buttons/collapse_thead.gif" alt="" border="0" /></a>

Latest Threads
</td>
</tr>
</tbody>
<tbody id="collapseobj_devbox_latest_threads" style="">
<tr>
<td class="alt1">
<table cellspacing="0" cellpadding="0" width="100%">
<tr><td class="smallfont" style="padding-bottom:6px;padding-top:6px;border-bottom: 1px solid #C1D5ED">
<tbody id="collapseobj_forumhome_latestthreads" style="$vbcollapse[collapseobj_forumhome_latestthreads]">
<tr>
<td class="alt2">&nbsp;</td>
<td class="alt1"><div class="smallfont">$threadbits</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>

<!-- /DEVBOX LATEST THREADS -->
<br />


<table class="tborder" cellpadding="6" cellspacing="1" width="100%">
<tbody>
<tr>
<td class="thead">
<a style="float:right" href="#top" onclick="return toggle_collapse('forumhome_stats')"><img id="collapseimg_forumhome_stats" src="db_style/buttons/collapse_thead.gif" alt="" border="0" /></a>
Forum Statistics
</td>
</tr>

</tbody>
<tbody id="collapseobj_forumhome_stats" style="">
<tr>
<td class="alt1" style="border: 1px solid #DFEAF6; border-top: none;">
<div class="smallfont">
<div>$vbphrase[threads]: $totalthreads</div>
$vbphrase[posts]: $totalposts</div>
$vbphrase[members]: $numbermembers</div>

</div>

</td>
</tr>
</tbody>
</table>

<br />


<!-- DEVBOX TOP POSTERS -->
<table class="tborder" cellpadding="6" cellspacing="1" width="100%">
<tbody>
<tr>
<td class="thead">

<a style="float:right" href="#top" onclick="return toggle_collapse('devbox_top_posters')"><img id="collapseimg_devbox_top_posters" src="db_style/buttons/collapse_thead.gif" alt="" border="0" /></a>
Top Posters
</td>
</tr>
</tbody>
<tbody id="collapseobj_devbox_top_posters" style="">
<tr>
<td class="alt1"><div class="smallfont"> $devbox[top_posters]</td>
</tr>
</tbody>
</table>
<!-- /DEVBOX TOP POSTERS -->
<br />



<!-- DEVBOX NEWEST MEMBERS -->

<table class="tborder" cellpadding="6" cellspacing="1" width="100%">
<tbody>
<tr>
<td class="thead">
<a style="float:right" href="#top" onclick="return toggle_collapse('devbox_newest_members')"><img id="collapseimg_devbox_newest_members" src="db_style/buttons/collapse_thead.gif" alt="" border="0" /></a>
Newest Members
</td>
</tr>
</tbody>
<tbody id="collapseobj_devbox_newest_members" style="">
<tr>

<td class="alt1"><div class="smallfont">$devbox[newest_members]</td>

</tr>
</tbody>
</table>
<!-- /DEVBOX NEWEST MEMBERS -->
<br />





http://www.detailcity.com/index.php?s=&styleid=17


**he didn't want all the stuff on the right side, the code I am realeasing will show Top posters, Site statistics, latest threads, newest members, etc.

nansy
10-31-2004, 02:33 PM
what is the problem :(


$devbox_config = array( 'latest_threads' => 'on',
'latest_threads_num' => 10,

'newest_members' => 'on',
'newest_members_num' => 5,

'top_posters' => 'on',
'top_posters_num' => 5,

'online_today' => 'on',

'forum_ids' => '2,3,5,6',
);


and i have error in line 180 !!!

how i can fix this problem

thanks
:( :( :(

Rick Sample
10-31-2004, 02:35 PM
:( :( :(


can you give me your sites address?

nansy
11-02-2004, 04:45 PM
i have error in line 180 !!!

no body help my

DariusMonsef
11-04-2004, 07:24 AM
I'm getting the line 180 error as well. Any ideas what is going on here?

Also where would I find this FORUMHOME thing??

domelor
11-27-2004, 10:20 PM
Guys the line 180 error is driving me crazy..... anyone can help?

boo.3
11-30-2004, 10:57 PM
what username and pass am i sopossed to use?

Imperial Fritz
12-02-2004, 07:06 PM
Trying now.

Btw minor spelling error at the last step, last sentence: "Everything fron turning it off..." :)


EDIT:

Hm, do I have to manually do those replacements?

I get the same three errors (line 81 and 180) after following the install :ermm:

Imperial Fritz
12-02-2004, 07:40 PM
OK. I looked again over the install and obviously I thought it will do the replacements on its own. So I did them and all worked. You should make it clear that these replacements have to be done by hand and place on a visible spot what file needs to be edited.

And I still get the errors with devbox_work.php

EDIT:

I think I found the problem - it's in us trying to open devbox_work.php as a page, whereas it's actually just a collection of functions that get included in the index.php page. There is no way it can be viewed separately. To change the settings you manually edit it and reupload it.

Mla7a6
03-08-2005, 08:58 PM
Hi..

The script was running smoothly with me on my old version of VB (3.0.1).. but then I have decided to upgrade to 3.0.7.. and suddenly it stopped working..

any ideas?

taffy056
03-11-2005, 08:31 AM
Hi,

Installed with no major problems, but how do I change the fonts used in this hack? Also Admins etc are not a different colour or bolded is there a way to to do this?


Thanks

zell_11
03-18-2005, 11:48 AM
i've installed this mod. Nice work:D

ChrisBaktis
03-27-2005, 01:40 PM
Installed but all the links are messed up - the posters, threads, and members are all listed correctly but if you click on them all the links are screwed up.

lasto
03-29-2005, 12:14 AM
cannot get this to work on vb3.0.7

no matter where i add the code for forumhome it always goes to the bottom of the screen and looks such a mess - ive tried numerous other locations within forumhome and it wont go.So no sidebar down the side as yet.

Anyone had better luck ?

i've installed this mod. Nice work:D
just been to your site m8 and it aint installed proper.Its supposed to be in a sidebar not at bottom of your screen.

ChrisBaktis
03-29-2005, 01:32 AM
cannot get this to work on vb3.0.7

no matter where i add the code for forumhome it always goes to the bottom of the screen and looks such a mess - ive tried numerous other locations within forumhome and it wont go.So no sidebar down the side as yet.

Anyone had better luck ?


just been to your site m8 and it aint installed proper.Its supposed to be in a sidebar not at bottom of your screen.

Actually from the Hack it is on the bottom - to get it on the side requires an additional hack.

Imperial Fritz
03-29-2005, 04:34 AM
It's supposed to be at the bottom. The sidebar is just an addon.

I actuall prefer it at the bottom cause my boards are broad (long names of threads usually) and a sidebar would just waste space.

lasto
03-29-2005, 11:46 AM
now explain to me why u would want all that info at the bottom of you screen - its nearly half a scren long and u can get better results using animes top X stats which is in a box and has better stats.

Imperial Fritz
03-29-2005, 05:27 PM
I just checked that one and it really looks better, although I'll probably keep the devbox "who was online today" bit.

Or even better, try to merge them somehow to get most functionality. :)

Gastongr
04-27-2005, 11:01 PM
I have installed this successfully, but i'd like to have the info in all pages, i'm using a hack called ad column 1.0 which creates a template for the colum and then inserts it in the header i think.
I puted the devboxwork functions there and it doesn't show anything. maybe because it's inserted in an other template that is not FORUMHOME?
any idea?
Thanks in advance

Gastongr
04-27-2005, 11:11 PM
That must be it works inserted in FORUMHOME and not in footer or header.
How can set this so functions can be called from all templates?

2HostMe
10-18-2005, 06:09 AM
Is there someone how get it work with version v3.5 ?
A reinstall in 3.5 don't work.

hawgjaw
10-19-2005, 07:10 PM
devbox-latest_threads_bit--{<b>$data[counter].</b>
<b><a href=\"showthread.php?$session[sessionurl]t=$data[threadid]\">$data[title]</a></b><br /> devbox-newest_members_bit-----{<b>$data[counter].</b> <a href=\"member.php?$session[sessionurl]u=$data[userid]\">$data[username]</a> on $data[date]<br /> devbox-online_today_bit--{<a href=\"member.php?$session[sessionurl]u=$data[userid]\">$data[opentag]$data[username]$data[closetag]$data[invisible]</a> devbox-top_posters_bit----{<b>$data[counter].</b> <a href=\"member.php?$session[sessionurl]$data[userid]\">$data[username]</a> with $data[posts] posts<br /> <?php
// +-----------------------------------------------------------------------------+
// | devbox_work.php |
// +-----------------------------------------------------------------------------+
// | Written by Christopher Nadeau |
// | - www.DevBox.net, www.DevBoxForums.com [chris@devbox.net] |
// +-----------------------------------------------------------------------------+
// | Copyright 2004 by Christopher Nadeau |
// +-----------------------------------------------------------------------------+
// | RELEASED UNDER THE EvB license: |
// | => Standard Attribution |
// | => Limited Derivs |
// | => Limited Translation |
// | MORE INFO HERE: |
// | => http://www.everythingvb.com/licenses/sa-ld-lt/1.0/ |
// +-----------------------------------------------------------------------------+
// | TABLE OF CONTENTS |
// | 1. CONFIGURATION: Config area, you should edit this area. |
// | |
// | 2. INTERPRETATION: Handles config, you should NOT edit ths area. |
// | |
// | 3. ADV. CONFIGURATION: Edit the SQL to use. You should only edit this |
// | area if you know what your doing. |
// | |
// | 4. SCRIPT: The actual script. You should NOT edit this area. |
// | |
// | 5. MISC: Misc functions. You should NOT edit this area. |
// +-----------------------------------------------------------------------------+

/************************************************** *******************************
1. CONFIGURATION
Each configuration value can be set to 'on', 'off', 1, 0, true or false.
=> 'on' - Activated
=> 'off' - Deactivated
=> 1 - Activated
=> 0 - Deactivated
=> true - Activated
=> false - Deactivated

*_*_num: the number of values to retrieve.

forum_ids: the forumid's of the forums you want to grab the latest threads
from. You can set this to 'auto' to include all forums that the
user has permission to see. Serparate each with a comma. Ex:
- '1,8,19,20'
- 'auto'
************************************************** *******************************/
$devbox_config = array( 'latest_threads' => 'on',
'latest_threads_num' => 10,

'newest_members' => 'on',
'newest_members_num' => 5,

'top_posters' => 'on',
'top_posters_num' => 5,

'online_today' => 'on',

'forum_ids' => 'auto',
);





/************************************************** *******************************
2. INTERPRETATION
This section just interprets the config options, and ensures they're alright.
You should skip this section and go onto #3 if you want.
************************************************** *******************************/
// Ensure all the right numbers are in place
$devbox_config['latest_threads_num'] = (int) $devbox_config['latest_threads_num'];
$devbox_config['newest_members_num'] = (int) $devbox_config['newest_members_num'];
$devbox_config['top_posters_num'] = (int) $devbox_config['top_posters_num'];

// Handle forum id's
if($devbox_config['forum_ids'] == 'auto')
{
$devbox_config['forum_ids'] = array();

foreach(array_keys($forumcache) AS $forumid)
{
$fp = &$bbuserinfo['forumpermissions']["$forumid"];
if ($fp & CANVIEW AND $fp & CANVIEWOTHERS)
{
$devbox_config['forum_ids'][] = $forumid;
}
}

$devbox_config['forum_ids'] = implode(',', $devbox_config['forum_ids']);
unset($fp);
}

$TP = TABLE_PREFIX;





/************************************************** *******************************
3. ADVANCED CONFIGURATION
These config values define what SQL should be used to grab the info from the
database. Don't touch these if you don't know what your doing! You have
to change these if you want information other then what is already
provided. Use the variable $TP for table prefix if you don't want to get out
of the quotes.
************************************************** ********************************/
$devbox_config['latest_threads_sql'] = "### devbox_work.php - grabbing latest threads ###
SELECT
t.threadid, t.title, t.replycount, t.views, t.lastposter, t.postusername, t.postuserid,
f.forumid, f.title AS forumtitle
FROM
{$TP}thread t,
{$TP}forum f
LEFT JOIN {$TP}deletionlog AS del ON (del.primaryid = t.threadid AND del.type = 'thread')
WHERE
f.forumid = t.forumid
AND f.forumid IN({$devbox_config['forum_ids']})
AND t.visible = 1
AND del.primaryid IS NULL
ORDER BY t.threadid DESC
LIMIT {$devbox_config['latest_threads_num']}";


$devbox_config['newest_members_sql'] = "### devbox_work.php - grabbing newest members ###
SELECT
u.userid, u.username, u.joindate, u.posts,
g.opentag, g.closetag
FROM
{$TP}user u,
{$TP}usergroup g
WHERE
g.usergroupid = u.usergroupid
ORDER BY u.userid DESC
LIMIT {$devbox_config['newest_members_num']}";

$devbox_config['top_posters_sql'] = "### devbox_work.php - grabbing top posters ###
SELECT
u.userid, u.username, u.posts,
g.opentag, g.closetag
FROM
{$TP}user u,
{$TP}usergroup g
WHERE
g.usergroupid = u.usergroupid
ORDER BY u.posts DESC
LIMIT {$devbox_config['top_posters_num']}";

$devbox_config['online_today_sql'] = "### devbox_work.php - grabbing online today ###
SELECT
u.userid, u.username, (u.options & {$_USEROPTIONS['invisible']}) AS invisible,
g.opentag, g.closetag
FROM
{$TP}user u,
{$TP}usergroup g
WHERE
g.usergroupid = u.usergroupid AND
u.lastactivity >= " . (mktime(0, 0, 0) + (($bbuserinfo['timezoneoffset'] - $vboptions['timeoffset']) * 3600)) . "
ORDER BY u.username ASC";





/************************************************** *******************************
4. SCRIPT
You shouldn't need to edit anything below this!
************************************************** *******************************/

$devbox = array('latest_threads' => '',
'newest_members' => '',
'online_today' => '',
'top_posters' => '',
);

//--------------------------------------------------------------------------------
// Grab the 'latest threads'
if(isOn('latest_threads'))
{
$devbox_latest_threads = $DB_site->query($devbox_config['latest_threads_sql']);
$devbox_config['latest_threads_num'] = $DB_site->num_rows($devbox_latest_threads);
$devbox_counter = 0;

if($devbox_config['latest_threads_num'] < 1)
{
$devbox['latest_threads'] = 'No threads.';
}

else
{
while($data = $DB_site->fetch_array($devbox_latest_threads))
{
$data['counter'] = ++$devbox_counter;
eval('$devbox[\'latest_threads\'] .= "' . fetch_template('devbox-latest_threads_bit') . '";');
}
}

$DB_site->free_result($devbox_latest_threads);
unset($devbox_latest_threads, $devbox_counter, $data);
}

//--------------------------------------------------------------------------------
// Grab the 'lastest members'
if(isOn('newest_members'))
{
$devbox_newest_members = $DB_site->query($devbox_config['newest_members_sql']);
$devbox_config['newest_members_num'] = $DB_site->num_rows($devbox_newest_members);
$devbox_counter = 0;

while($data = $DB_site->fetch_array($devbox_newest_members))
{
$data['counter'] = ++$devbox_counter;
$data['date'] = vbdate($vboptions['dateformat'], $data['joindate'], false, true, false);
eval('$devbox[\'newest_members\'] .= "' . fetch_template('devbox-newest_members_bit') . '";');
}

$DB_site->free_result($devbox_newest_members);
unset($devbox_newest_members, $devbox_counter, $data);
}

//--------------------------------------------------------------------------------
// Grab the 'online today'
if(isOn('online_today'))
{
$devbox_online_today = $DB_site->query($devbox_config['online_today_sql']);
$devbox_counter = 0;

while($data = $DB_site->fetch_array($devbox_online_today))
{
$data['counter'] = ++$devbox_counter;

if($data['invisible'])
{
if(!($permissions['genericpermissions'] & CANSEEHIDDEN))
continue;
else
$data['invisible'] = '*';
}

else
$data['invisible'] = '';

eval('$devbox[\'online_today\'] .= "' . fetch_template('devbox-online_today_bit') . '";');
$devbox['online_today'] .= ', ';
}

$devbox['online_today'] = substr($devbox['online_today'], 0, (strlen($devbox['online_today']) - 3));
$devbox['online_today_num'] = $devbox_counter;

$DB_site->free_result($devbox_online_today);
unset($devbox_online_today, $devbox_counter, $data);

////////////////////

if(!isset($datastore['maxonlinetoday']))
{
$devbox['online_today_max'] = $devbox['online_today_num'];
$devbox['online_today_maxwhen'] = mktime();

$devbox_ot['online_today_max'] = $devbox['online_today_max'];
$devbox_ot['online_today_maxwhen'] = $devbox['online_today_maxwhen'];
$devbox_ot = serialize($devbox_ot);

$DB_site->query("### devbox_work.php - insert online today into datastore ###
INSERT INTO {$TP}datastore (title, data) VALUES ('maxonlinetoday', '$devbox_ot')");
}

else
{
$devbox_ot = unserialize($datastore['maxonlinetoday']);
if($devbox_ot['online_today_max'] < $devbox['online_today_num'])
{
$devbox['online_today_max'] = $devbox['online_today_num'];
$devbox['online_today_maxwhen'] = mktime();

$devbox_ot['online_today_max'] = $devbox['online_today_max'];
$devbox_ot['online_today_maxwhen'] = $devbox['online_today_maxwhen'];
$devbox_ot = serialize($devbox_ot);

$DB_site->query("### devbox_work.php - update online today ###
UPDATE {$TP}datastore SET data='$devbox_ot' WHERE title='maxonlinetoday'");
}

else
{
$devbox['online_today_max'] = $devbox_ot['online_today_max'];
$devbox['online_today_maxwhen'] = $devbox_ot['online_today_maxwhen'];
}
}

$devbox['online_today_maxwhen'] = vbdate($vboptions['dateformat'], $devbox['online_today_maxwhen'], true, true, false);
unset($devbox_it);
}

//--------------------------------------------------------------------------------
// Grab the 'top posters'
if(isOn('top_posters'))
{
$devbox_top_posters = $DB_site->query($devbox_config['top_posters_sql']);
$devbox_config['top_posters_num'] = $DB_site->num_rows($devbox_top_posters);
$devbox_counter = 0;

while($data = $DB_site->fetch_array($devbox_top_posters))
{
$data['counter'] = ++$devbox_counter;
eval('$devbox[\'top_posters\'] .= "' . fetch_template('devbox-top_posters_bit') . '";');
}

$DB_site->free_result($devbox_top_posters);
unset($devbox_top_posters, $devbox_counter, $data);
}





/************************************************** *******************************
5. MISC
Misc functions. You shouldnt edit this area.
************************************************** *******************************/
// check if config value to see if we should do something or not
function isOn($what)
{
global $devbox_config;

if(!isset($devbox_config["$what"]))
return false;

$val = $devbox_config["$what"];

if(is_string($val))
$val = strtolower($val);

if($val === 'on' OR $val === 1 OR $val === true)
{
$devbox_config["$what"] = true;
return true;
}
else
{
$devbox_config["$what"] = false;
return false;
}
}

?> The boxes are on the side but it did not remove the default ones at the bottom and they are not updating but they do look like they are supposed to, I posted all I thought was needed any help would be great. Here is a link to my site if you need to look at it. http://www.bedrocksoriginaltavern.com/forums/index.php?

Crazy Serb
12-03-2005, 03:54 AM
Is there someone how get it work with version v3.5 ?
A reinstall in 3.5 don't work.

yeah, is there anything similar to this for version 3.5?

Oleks
04-16-2006, 04:54 PM
Hi duno if any one has had this i installed the hack as the instrutions said and leaft every thing default all installed fine said it was ok but its not there and not showing in admin cp ither any idears guys

all the best sirblack

Hi,
I have the same problem. :cross-eyed:
It's supposed to be at the bottom. But, there is no box at all. :tired:

Where to look and to check?