Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 10-01-2000 Last Update: Never Installs: 0
 
No support by the author.

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

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #52  
Old 10-10-2000, 02:33 PM
Guest
 
Posts: n/a
Default

Quote:
Originally posted by rangersfan
in the third post in this thread I brought up the potential for this sort of behavior to occur

I read it, and try it, because you post that.

Sometimes you just don't want to release hacks because of the negativity that can be directed towards you.
If you write that because me, im sorry, the problem was we can understand us (TWT and me). Apologies to TWT if he feels its the case and for my bad english again.

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.
Reply With Quote
  #53  
Old 10-10-2000, 03:16 PM
Guest
 
Posts: n/a
Default

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.
Reply With Quote
  #54  
Old 10-10-2000, 04:03 PM
Guest
 
Posts: n/a
Default

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
Obviously, you'll have to change the variable names and change the references to "usetemplate"
Reply With Quote
  #55  
Old 10-22-2000, 05:04 AM
Guest
 
Posts: n/a
Default

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");
Reply With Quote
  #56  
Old 10-22-2000, 05:12 AM
Guest
 
Posts: n/a
Default

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.
Reply With Quote
  #57  
Old 10-22-2000, 08:55 PM
Guest
 
Posts: n/a
Default

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");
I have come up with an optimization for forumdisplay. Did you know that vB runs a query for each thread shown on forumdisplay to retrieve the Name and Path to the message icon (if the thread has one). Using a simple LEFT JOIN you can get that info with the query that retrieves all the threads to begin with. I have incorporated it into my favorites hack.
Reply With Quote
  #58  
Old 10-24-2000, 12:24 AM
Guest
 
Posts: n/a
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:33 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04343 seconds
  • Memory Usage 2,264KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete