vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   vBFavorites v1.0 (https://vborg.vbsupport.ru/showthread.php?t=47124)

Mystis 12-29-2002 10:00 PM

vBFavorites v1.0
 
Alright everyone, here's my first (hopefully of many) released hack, so have mercy :)

This hack adds a category to your index.php page containing the X (customizable) most frequented forums by that particular user. This hack does not apply to guests however, or members who have no (or less than a customizable amount of) posts.

Not much more to it, it's a very simple 2 minute install and it should (although I haven't verified it) work across 2.2.x. A live demo will be available soon at Somethingleet, but for now some screenshots will have to do. Please let me know the url of the forums you install it on, if you do, I like seeing where my work is used :)

Screenshots:
Screenshot of what it looks like to your qualifying user with a sufficient number of posts - [here]
Screenshot of how it appears to a guest - [here]
Screenshot of how it appears to a registered user without a sufficient number of posts - [here]

Minihacks & Customizations:
Exclude a forum from favorites
Make 'Your Favorites' Username's favorites

If you like the hack, make sure and install it!

Mystis 12-30-2002 05:54 AM

Screenshot of what it looks like to your qualifying user with a sufficient number of posts

Mystis 12-30-2002 05:54 AM

Screenshot of how it appears to a guest

Mystis 12-30-2002 05:54 AM

Screenshot of how it appears to a registered user without a sufficient number of posts

Auero 12-30-2002 06:29 AM

nice one Mystis :)

LangTuDaTinh 12-30-2002 08:28 AM

how do u calculate which forums to display in favorite?

Chris M 12-30-2002 08:49 AM

Looks good:)

Satan

NuclioN 12-30-2002 09:07 AM

"most frequented forums by that particular user" ??? It looks as they are displayed random, not in any relation to the postingbehavior of a member.

One-Team 12-30-2002 10:58 AM

very cool hack i like it :cheeky:

Mystis 12-30-2002 02:51 PM

Quote:

Originally posted by NuclioN
"most frequented forums by that particular user" ??? It looks as they are displayed random, not in any relation to the postingbehavior of a member.
No, they display the forums that the user posted most in. In the first screenshot the user posted 6 times in the main forum, 6 times in the secondary forum, and twice in the third-ary and fourth-ary forums. Third-ary is displayed over fouth-ary because it has a higher posting order.

Quote:

Originally posted by LangTuDaTinh
how do u calculate which forums to display in favorite?
A single SQL query, which you can find in line 33 of the installation text file :) It takes the 3 (or whatever number you specify) forums in which the user has made the most posts,

Crazy Pete 12-30-2002 03:27 PM

Looks good!

/me clicks install

mx3 12-30-2002 05:29 PM

Wow! This is great!

*installs*

P.S. i installed on a 2.2.6, so it should work from (at least) that and up.

Chris M 12-30-2002 05:32 PM

In theory it should work for all vB 2.2.x versions;)

Satan

Okiewan 12-30-2002 08:46 PM

VERY USEFUL!!
Congrats on a great idea.

Anyway to include the member name in the "Favorites" line?
ie; "MemberName's Favorites"

Mystis 12-30-2002 09:29 PM

Quote:

Originally posted by Okiewan
VERY USEFUL!!
Congrats on a great idea.

Anyway to include the member name in the "Favorites" line?
ie; "MemberName's Favorites"

Hmm...since this is a standard forum/category, you would have to do some heavy template editing, which probably isn't worth the effort. If it's in real high demand then I might figure out how though, it's not something that I can do off the top of my head.

Velocd 12-30-2002 10:24 PM

If I'm understanding correctly, this hack shows your most frequently posted forums in the "favorite list", correct? Well, if this is the case, and Okiewan wants it simply to show the members name, then use $bbuserinfo[username] in the "favorites" line, that will show the members name. Unless I am missing something.. ;)

Chris M 12-30-2002 11:02 PM

Of course you aren't Velo;)

I was just about to say the same thing;)

Satan

Icheb 12-30-2002 11:14 PM

Uhm, "third-ary"? ;c))) ;)

Mystis 12-30-2002 11:48 PM

Quote:

Originally posted by Velocd
If I'm understanding correctly, this hack shows your most frequently posted forums in the "favorite list", correct? Well, if this is the case, and Okiewan wants it simply to show the members name, then use $bbuserinfo[username] in the "favorites" line, that will show the members name. Unless I am missing something.. ;)
You aren't able to add variables to things such as forum names, are you? I was pretty sure that you aren't able to. Let me go test it out.

Edit: Nope, didn't think it would. I tried making a replacement turning {username} to $bbuserinfo[username], and that didn't work either.

LangTuDaTinh 12-31-2002 04:18 AM

great hack....i installed it...thanks

is there a way i can exclude a forum from fav. forums? (which will effect to all)

Mystis 12-31-2002 04:31 AM

Sure, just change

Code:

$query = $DB_site->query("SELECT forum.forumid as forumid, forum.* as foruminfo, COUNT(post.postid) as numposts FROM forum, thread, post WHERE forum.forumid=thread.forumid AND thread.threadid=post.threadid AND post.userid='".$bbuserinfo[userid]."' GROUP BY forumid ORDER BY numposts DESC LIMIT 0,".$max_forums);
to

Code:

$query = $DB_site->query("SELECT forum.forumid as forumid, forum.* as foruminfo, COUNT(post.postid) as numposts FROM forum, thread, post WHERE forum.forumid=thread.forumid AND thread.threadid=post.threadid AND post.userid='".$bbuserinfo[userid]."' AND forum.forumid!=9999 GROUP BY forumid ORDER BY numposts DESC LIMIT 0,".$max_forums);
Replace 9999 with the forumid of the forum you want excluded.

Velocd 12-31-2002 05:29 AM

lol, I had forgot that forum names were even inputted.. I must have been thinking it was hardcoded for some reason (been a while since I added a forum). :p

Anyway, to get the effect you requested Okiewan, find in index.php:
PHP Code:

eval("\$forumbits .= \"".gettemplate("forumhome_forumbit_level$depth$tempext")."\";"); 

And above it place:
PHP Code:

if($forum[forumid] == $favorites_id && $bbuserinfo[userid] <> 0){
                
$forum[title] = "$bbuserinfo[username]s? " $forum[title];
        } 

;)

Mystis 12-31-2002 08:45 PM

Nice velo, I was looking at it like it was much more complicated than that. I think I'm going to index all of the little code modifications on the first post.

Silenced Soul 12-31-2002 09:36 PM

nice hack. Got no use for it, on my site though...

Darth Cow 12-31-2002 10:56 PM

Awesome hack. I installed it last night in less than 5 minutes and my members have already made several dozen posts on the thread I made for feedback praising it :).

Mystis 01-01-2003 12:38 AM

That's great to hear DC :D That's on my agenda for v2, also, is making an editable list.

Freestyler 01-01-2003 03:27 AM

Is it possible to modify this hack so that you can have (in the style header), just below the main forum logo/buttons, little text links of just the three 'favorite' forums?

So that no matter where the user is in the forums (well, wherever the header is displayed), they can always just hit one of the three links to go to one of their top 3 forums?

If that's not possible, then is there any other hack which can do this :) ?

Mystis 01-01-2003 04:01 AM

Sure, it would take some heavy modification, but the SQL query is there, and that's what took me the bulk of the time developing this hack. I'll give it a shot and see what I can do :)

supreemball 01-02-2003 12:56 AM

sweeeeeet mystis.

SL will definitely enjoy this hack :D

Mithan 01-02-2003 01:31 AM

Great hack, but it would be cool if you could somehow modify this hack so that people could specifically add forums to the favorite list.

Mystis 01-02-2003 03:08 AM

Mithan - that would be a complete overhaul, but I am planning to do this in version 2.

Supreem - That's great, I'm glad to be able to use it :D It was a fantastic idea.

Mithan 01-14-2003 02:25 PM

Ok awesome.

One thing I thought you should know as well, is that if you have the collapsable thread install, when you collapse the "favorites", the original forum section collapses as well, and vice versa.

Mystis 01-15-2003 02:13 AM

Quote:

Originally posted by Mithan
Ok awesome.

One thing I thought you should know as well, is that if you have the collapsable thread install, when you collapse the "favorites", the original forum section collapses as well, and vice versa.

Yeah, the way this is set up there would be compatability problems with many forumhome hacks. Not really a catch-all way to fix any of the problems, it would have to be done on a per-hack basis and I don't have the time to do that, sorry.

ddausch 02-05-2003 02:07 PM

Hallo

da ich kein english kann versuch ich meine Frage halt auf deutsch zu stellen und hoffe das jemand antworten kann :D

Habe den hack wie beschrieben eingebaut... nur wie k?nnen die User nun Ihr Favoriten in das Board eintragen ??

ddausch 02-05-2003 06:25 PM

Hab dann hinbekommen... nur das diese funktion arg zu lasten der boardgeschwindigkeit geht

Mystis 02-05-2003 09:56 PM

Quote:

Originally posted by ddausch
Hallo

da ich kein english kann versuch ich meine Frage halt auf deutsch zu stellen und hoffe das jemand antworten kann :D

Habe den hack wie beschrieben eingebaut... nur wie k?nnen die User nun Ihr Favoriten in das Board eintragen ??

Noch nicht aber arbeite ich daran in meiner freien Zeit:) soll Es bald beendet werden.

- Freetranslation.com :D


All times are GMT. The time now is 04:43 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01371 seconds
  • Memory Usage 1,809KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (36)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete