The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Details »» | |||||||||||||||||||||||||
Hi There!
This thread (as the name implies) allows registered users to "save" threads that interest them, and go back and view them all on one page whenever they want. It's sort of like "bookmarking" their favorite threads. Took awhile, but it works just fine. Did a clean install, followed my own readme instruction and it works! It's not amazing by any means, but I think it came out surprisingly well. Here's all I need from you all: - Please report any bugs to me ASAP. - Please make suggestions for future editions. - Please feel free to tell me what aspects of it you think I should lose. ------------------------------- Download ------------------------------- http://www.movieforums.com/hacks/ ------------------------------- Demo ------------------------------- http://www.spunkyjunk.com/testboard/ Here are some things I have planned for future versions: - Ability to create folders to sort the saved threads. - Searching the saved threads. - Having it slip over into multiple pages with larger totals. - Having the saved threads page reflect topics with new posts, just as the forums do when you're logged in. I also know that Ed or rangersfan could create a better hack that does the same things in about a day - but I hope they won't have to now Thanks to the programmers here to also answered some of my questions about the script. Please let me know what you think, and list your boards here so I can see it in use! [Edited by TWTCommish on 09-30-2000 at 09:47 PM] Show Your Support
|
Comments |
#52
|
|||
|
|||
Quote:
Maybe this help: I thing the best way to make the limit of # saved thread is: Set one variable for that in the script: IF #savedthreads = #maxsavedthreads THEN Show message "You have the limit of tread... delete some... and then add more..." ELSE Add new savedthread. I dont know php or mysql, but i thing this is the quiz. Then the webmaster can set #maxsavedthreads. Thanks again. |
#53
|
|||
|
|||
Hi fenix,
Absolutely - that would definetly work...and I think I'll add it to the next version...my main goal though, has been to split a high number of saved threads over to a new page...IE...page 1 has saved threads 1-10, page 2 has 11-20, etc. I tried searching on PHP.net and PHPBuilder.com but just couldn't get the hang of it. |
#54
|
|||
|
|||
Use MySQL's LIMIT feature:
LIMIT 0,10 <-- will get 10 records, starting from the first one (0) LIMIT 10,20 <-- will get 20 records, starting from the 11th just add something like: if (!$limitstart) { $limitstart = 0; } $limitquery = "LIMIT $limitstart,25"; And reference $limitquery in your MySQL query. Showing the paging mechanisms involves counting how many threads there actually are, then running a loop. Here's the code I used in mArticle to do it: Code:
$acount=$DB_site->query_first("SELECT COUNT(id) AS id FROM $table[articlemain] WHERE section=$sec AND (notes NOT LIKE '%U%')"); $count=$acount[id]; $amntpages = ceil($count/$maxperpage); if ($amntpages==0) { $amntpages = 1; } $i = 0; $pages = ""; while($i<$amntpages) { $i2 = $i + 1; $limit = $maxperpage * $i; if ($limit==$limitstart) { eval("\$pages .= \"".usetemplate("browsesec_pagecur")."\";"); } else { eval("\$pages .= \"".usetemplate("browsesec_pageother")."\";"); } $i++; } //end while $i<=$amntpages |
#55
|
|||
|
|||
Commish : I am working on my own thread saving hack at the moment. It is going to have pages (of course) and have a folder system where you can categorize your threads. It will also allow for you to sort the list via a few different criteria.
Here is my monster SQL statement at the moment (all I really have right now) Code:
$q = $DB_site->query("SELECT title, favorites.userid, favorites.threadid, folder FROM favorites,thread LEFT JOIN favorites_folders ON (favorites.folderid = favorites_folders.folderid) WHERE favorites.userid = $bbuserid AND thread.threadid = favorites.threadid ORDER by folder,title"); |
#56
|
|||
|
|||
In that case I'll probably dispose of mine - was fun while it lasted. Glad to turn it over to someone with more experience.
Good luck. |
#57
|
|||
|
|||
Here is my updated query:
Code:
$q_thread = $DB_site->query("SELECT thread.iconid, icon.title AS icontitle, icon.iconpath, open, thread.title AS threadtitle, lastpost, postusername,lastposter, views, replycount, fav_threads.userid, fav_threads.threadid, fav_threads.folderid, folder FROM fav_threads,thread LEFT JOIN fav_folders ON (fav_threads.folderid = fav_folders.folderid) LEFT JOIN icon ON (icon.iconid = thread.iconid) WHERE fav_threads.userid = 1 AND thread.threadid = fav_threads.threadid ORDER by folder,thread.title"); |
#58
|
|||
|
|||
Please refer to thread http://www.vbulletin.com/forum/showt...7193#post37193 for the beta release of my hack. Will update this thread when I declare it final.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|