PDA

View Full Version : [release] Kousetsu welcome panel (includes hackless avatar on homepage!)


Brad
12-01-2002, 10:00 PM
Kousetsu Welcome Panel
|- because every hacker needs to release at least one ;).


This modification adds a new table to your index.php, its ment to welcome the user/guest and make everything look neater on forumhome. Check out the Screenshots in the next two post for a preview or view Kousetsu (www.kousetsu.net/forums)

This modification also includes a hackless verson of fireflys Avatar on homepage (https://vborg.vbsupport.ru/showthread.php?s=&threadid=32560) hack.

Ive used this on 2.2.5 rc - 2.2.9 final with no problems, all install docs and images in zip. If you use this please click the Install button in this thread, thank you.

Add-on's:

since your last visit XX posts and XX threads (http://www.vbulletintemplates.com/mods/showthread.php?s=&postid=17578#post17578) - By Anime-loo

Brad
12-01-2002, 11:03 PM
Screenshot of welcome panel when user is logged out/guest hits index.php

Brad
12-01-2002, 11:04 PM
When user logged in they see this:

CannonFodder
12-01-2002, 11:06 PM
i like it, i`ll have to try it out

filburt1
12-01-2002, 11:12 PM
I'm shocked, AL! After that discussion there's still no [release] or header in the post! ;)

Looks nice :)

Brad
12-01-2002, 11:13 PM
I was just about to add that myself, cooking and posting a modification at the same time makes you forget some things ;).

filburt1
12-01-2002, 11:24 PM
*crash* Agh! I got boiling water on the keyboard again! *fire sounds*

Brad
12-02-2002, 02:57 AM
Add-on: since your last visit XX posts and XX threads

This modification will add the amount of new post/threads in the welcome panel. Be aware this adds 2 queries to index.php and they are processer intensive. Ive released this modification in stand alone format here (http://www.vbulletintemplates.com/mods/showthread.php?s=&threadid=1572).


Install doc: (welcome panel must be installed frist)

---------------------------------------
Open the phpinclude template
---------------------------------------

## find

if (strpos($_SERVER['PHP_SELF'], 'index.php') != false)
{
if ($bbuserinfo[userid]!=0) {
$avatarurl=getavatarurl($bbuserinfo[userid]);
if ($avatarurl=='') {
$avatarurl='images/noavatar.gif';
}
$avatarimage='<img src="'.$avatarurl.'">';
} else {
$avatarimage='<a href="register.php?s='.$session[sessionhash].'&action=signup"><img src="images/guestavatar.gif"></a>';
}
}

## Replace with:

if (strpos($_SERVER['PHP_SELF'], 'index.php') != false)
{
if ($bbuserinfo[userid]!=0) {
$avatarurl=getavatarurl($bbuserinfo[userid]);
if ($avatarurl=='') {
$avatarurl='images/noavatar.gif';
}
$avatarimage='<img src="'.$avatarurl.'">';
} else {
$avatarimage='<a href="register.php?s='.$session[sessionhash].'&action=signup"><img src="images/guestavatar.gif"></a>';
}
// Start new threads/posts
$loonewthread=$DB_site->query_first("SELECT COUNT(*) AS threads FROM thread WHERE lastpost > '$bbuserinfo[lastvisit]'");
$loonewpost=$DB_site->query_first("SELECT count(*) AS posts FROM post WHERE dateline > '$bbuserinfo[lastvisit]'");
}

---------------------------------------------------
Open template forumhome_welcometext
---------------------------------------------------

## Find:

You last visited: $bbuserinfo[lastvisitdate].<br>

## Replace with:

You last visited: $bbuserinfo[lastvisitdate].<br />There have been <b>$loonewthread[threads]</b> threads and <b>$loonewpost[posts]</b> posts since your last visit!<br />

////////
add-on installed
///////

Screenshot (http://www.vbulletintemplates.com/mods/attachment.php?s=&postid=12666)

Tony G
12-02-2002, 03:12 AM
Nice, I'll create an add-on for it soon. :)

Wayne Luke
12-05-2002, 02:06 AM
They since last visit add-on is nice. Too bad it requires a nasty index on the dateline field to be usable on large forums. I added this to SitePoint and the query for this alone added two seconds to the processing time.

Brad
12-05-2002, 04:09 AM
Wayne, if you use the hack someone posted a fix for that, it modifiys the database however.

imported_plattopus
12-05-2002, 12:29 PM
lol... the phpinclude is cheating!! :D