vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   vbFavorites (https://vborg.vbsupport.ru/showthread.php?t=81870)

akanevsky 05-21-2005 10:00 PM

vbFavorites
 
/*================================================= =====================*\
|| vbFavorites
|| Author : Psionic Vision
|| Works on : vBulletin 3.0.7
\*================================================ ======================*/

Did you ever find a useful thread on a bb? Did you want to save it for reading later? Did you have to choosing between subscribing to the thread and clogging your mailbox or adding it to your browser favorites and never finding it afterwards?
The problem has been solved!

With this hack, you can create your own personalized favorites menu within the bulletin board itself. You can add both posts and threads to the favorites. You can access the favorites from your usercp homepage. You can also specify a custom name for your favorites entry. It will also display latest 5 threads and posts in the nabar... See screenshots for more.

If you like it, do not forget to click INSTALL :)

The hack is free, however if you like that hack, feel free to DONATE (paypal it using my email which is written on top of this post) :)

RichieBoy67 05-22-2005 08:14 PM

Nice!! Thanks :)


I guess I get to be first to install this!!!!!!! Honored to be the first..

TTG 05-22-2005 08:29 PM

2nd .. very useful hack and works well on 3.0.6.

Clicked install

nexialys 05-22-2005 08:30 PM

question: in the custom name of the entry, is it working from a popup ?!... i don't like to overload my board with multiple pages for a single action... would be cool to have it in a popup forthe entire process, or even better, AJAX.. ;)

EDIT !:yes, the more i think of it, the more i think it can be easy to add a quick "add to favs" button working directly with AJAX, same way it "lock/unlock" threads... the complete "rename" page would be independant from the AJAX, but i think that the coming of AJAX is useful here... very useful!

ANOTHER EDIT: you forgot the
PHP Code:

" . TABLE_PREFIX . " 

in all the SQL queries... :)

EDIT 3: for the guys that built Links Systems, Articles or Albums systems, this Favorites can become your friend... check the code, it would be easy to add anyother kind of favorites to it...

T_Montana 05-22-2005 08:38 PM

awsome hack.....i will wait to install make sure their aren't any bugs but i have a question......

to view you favorits are they in a pulldown menu from navbar or do you have to go into usercp?

akanevsky 05-22-2005 08:50 PM

RichieBoy67, TTG
Thanks for positive feedback.

nexialys,
1. I am not sure whether anybody needs AJAX here.
2. Wrong. Check twice before claiming an error. Favorites table does not use prefix regardless of the presence or absence of the prefix in other tables.
3. It does not come in a popup, it comes on a small separate page as shown in the screenshot.

T_Montana,
1. You can be absolutely sure that there are no bugs.
2. You have to go to usercp. However, further modifications of this hack are not impossible (note that there can be a lot of favorites in one's list, so this is not likely to be of any use).

T_Montana 05-22-2005 09:02 PM

Quote:

Originally Posted by Dark Visor
RichieBoy67, TTG
Thanks for positive feedback.

nexialys,
1. I am not sure whether anybody needs AJAX here.
2. Wrong. Check twice before claiming an error. Favorites table does not use prefix regardless of the presence or absence of the prefix in other tables.
3. It does not come in a popup, it comes on a small separate page as shown in the screenshot.

T_Montana,
1. You can be absolutely sure that there are no bugs.
2. You have to go to usercp. However, further modifications of this hack are not impossible (note that there can be a lot of favorites in one's list, so this is not likely to be of any use).

yes i was thinking this too but you can have your top 10 favorites or you last 10 added favorites in dropdown menu from navbar....that would be pretty cool

T_Montana 05-22-2005 09:04 PM

also how do i run a query?I have never had to this so have no idea what to do

akanevsky 05-22-2005 09:04 PM

Aha! Last 10 is a great idea. I will add that.

You run a query using either PhpMyAdmin in your hosting's cpanel or AdminCP => Maintenance => Run SQL Query in your vBulletin.

sabret00the 05-22-2005 09:10 PM

good idea :)

T_Montana 05-22-2005 09:36 PM

Can't find this in my function-databuild file......
Code:

---------------------------------------------------------------------------------------------------------------------------
FIND
---------------------------------------------------------------------------------------------------------------------------

                        $DB_site->query("DELETE FROM " . TABLE_PREFIX . "deletionlog WHERE type = 'post' AND primaryid IN ($postids" . "0)");

this is the closest thing to it

Code:

$DB_site->query("DELETE FROM " . TABLE_PREFIX . "deletionlog WHERE primaryid = $postid AND type = 'post'");

akanevsky 05-22-2005 10:11 PM

What version do you have? of vB?

akanevsky 05-22-2005 10:36 PM

UPDATE: v1.01

By T Montana's request, this hack now also includes last 5 threads and posts in the navbar. Screenshot includes. Upgrade instructions also includes.

T_Montana 05-22-2005 11:10 PM

3.0.7

akanevsky 05-23-2005 12:04 AM

In my 3.0.7, there is such a line. Try one of there (you can add the line after any of these):

$DB_site->query("DELETE FROM " . TABLE_PREFIX . "editlog WHERE postid IN ($postids" . "0)");
$DB_site->query("DELETE FROM " . TABLE_PREFIX . "moderation WHERE postid IN ($postids" . "0)");
$DB_site->query("DELETE FROM " . TABLE_PREFIX . "reputation WHERE postid IN ($postids" . "0)");
$DB_site->query("DELETE FROM " . TABLE_PREFIX . "post_parsed WHERE postid IN ($postids" . "0)");
$DB_site->query("DELETE FROM " . TABLE_PREFIX . "post WHERE postid IN ($postids" . "0)");

goyo 05-23-2005 04:38 AM

Great hack...although there's a problem:

From 1.0.1 install text:
Code:

CREATE TABLE `favorites` (
`entry_id` INT( 10 ) UNSIGNED NOT NULL ,
`entry_type` VARCHAR( 10 ) NOT NULL ,
`entry_title` VARCHAR( 255 ) NOT NULL ,
`userid` INT( 10 ) UNSIGNED NOT NULL
`dateline` int(100) unsigned NOT NULL default '0'
);

I'm receiving this error after running on mysql:
error number: 1064
error desc: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'dateline` int(100) unsigned NOT NULL default '0'
)' at line 6

goyo 05-23-2005 04:53 AM

ehh a comma missing :nervous:

The right code:
Code:

CREATE TABLE `favorites` (
`entry_id` INT( 10 ) UNSIGNED NOT NULL ,
`entry_type` VARCHAR( 10 ) NOT NULL ,
`entry_title` VARCHAR( 255 ) NOT NULL ,
`userid` INT( 10 ) UNSIGNED NOT NULL ,
`dateline` INT(100) unsigned NOT NULL default '0'
);


Cap'n Steve 05-23-2005 05:55 AM

Cool idea, I'm surprised this hasn't been done before.

You should always use TABLE_PREFIX though. You never know how people's databases are set up and they might rely on the prefix.

Lionel 05-23-2005 08:01 AM

Suggestions: When you click on "Complete List of Favorites" link in navbar, if there are none, can we say it, instead of looking at a page and wondering what that is supposed to be?

never mind, I forgot to put the conditionals

artonex 05-23-2005 09:07 AM

overgrow.com is ran on vb2 and they have a hack like this.

akanevsky 05-23-2005 09:29 AM

A comma missing - will be fixed ASAP.
TABLE_PREFIX - ok, I will add that...
overgrom.com - that is vb2. besides, I never heard of that board.

Thanks for positive comments :)

Lionel 05-23-2005 03:36 PM

The favorites links in navbar do not display on vbadvanced pages. Can you tell us what the globals names are? We need to add them in vbadvanced settings.

Found them. Needed to add those in vbadvanced settings:ermm:

lastfavpostbit
lastfavthreadbit

and for those with vbaLinks, you need to add those in your construct navbar function in includes/functions_links.php

global $lastfavpostbit;
global $lastfavthreadbit;

and finally hardcode the showthread.php and showpost.php in the global.php

Princeton 05-23-2005 03:41 PM

this looks great ... I'll click INSTALL :up:

akanevsky 05-23-2005 06:24 PM

[B]Update to 1.02:[*] Fixed comma error in the table creation query[*] The hack now uses TABLE_PREFIX

Update is fairly easy, for the update instructions are included.

gldtn 05-23-2005 08:05 PM

Quote:

Originally Posted by Dark Visor
[B]Update to 1.02:
[*] Fixed comma error in the table creation query[*] The hack now uses TABLE_PREFIX

Update is fairly easy, for the update instructions are included.

I noticed the comma problem as soon as I ran the queries, but was able to fix the problem myself(yahoooooo :P).

Ahh sorry to jump in the conversation like this.. overgrow.com been around since the first days of vB and they had a very similar hack, just like they had the karma hack since the early days of vb2.. although shebang(the owner) did not want to share it for free :P

So, thanks a lot Dark Visor for sharing, great hack, great instructions..

Although I would prefere if the coders put comments before and after the code we have to change, add, or replace for easy detection if mistakes are made :) - Just a thought, don't take me serious :P

Wow, I'm typing too fast, I think I had way too much coffee!

Once again great hack, ahh! Dark do you think this would be possible to be intergrated using the AJAX system? this would get rid of the ADD ENTRY template and maybe others.

T_Montana 05-23-2005 08:51 PM

when i edit global.php i get this.....

Code:

Database error in vBulletin 3.0.7:

Invalid SQL: SELECT * FROM favorites WHERE entry_type='thread' AND userid = '1' ORDER BY dateline DESC LIMIT 5
mysql error: Unknown column 'dateline' in 'order clause'

mysql error number: 1054

Date: Monday 23rd of May 2005 02:47:19 PM
Script: http://craxxxs.com/forums/
Referer:
Username: T_Montana
IP Address: **.***.***.**


Lionel 05-23-2005 11:37 PM

Quote:

Originally Posted by gldtn
Once again great hack, ahh! Dark do you think this would be possible to be intergrated using the AJAX system? this

Ajaxing this would be really cool ;)

akanevsky 05-24-2005 01:18 AM

T_Montana,

Read the upgrade instructions carefully. It tells you to run another query.

About AJAX: Sorry, but I have no experience in making AJAX. I'll have to research the subject further before I can implement it in my hacks.

M1th 05-24-2005 11:19 AM

I like the idea of a favorites hack but the subscriptions page make it all a little redundant. Why not just pull the thread subscriptions data and display as a drop down?

akanevsky 05-24-2005 05:56 PM

Because, M1th, as the hack description states, nobody wants to subscribe to a lot of topics and get flooded just because he wants to read it later. Besides, you cannot subscribe to posts.

artonex 05-24-2005 08:05 PM

Dark Visor take alook at the Favorites overgrow.com/edge use its very good :D

akanevsky 05-25-2005 09:27 AM

TheWebJunkie,
Screenshot please? :P

dsboyce8624 06-11-2005 07:13 AM

Quote:

Originally Posted by Lionel
The favorites links in navbar do not display on vbadvanced pages. Can you tell us what the globals names are? We need to add them in vbadvanced settings.

Found them. Needed to add those in vbadvanced settings:ermm:

lastfavpostbit
lastfavthreadbit

and for those with vbaLinks, you need to add those in your construct navbar function in includes/functions_links.php

global $lastfavpostbit;
global $lastfavthreadbit;

and finally hardcode the showthread.php and showpost.php in the global.php

I added the variables to vBa, but still no link in navbar, when I click add on either a thread or a post after submitting I get a blank screen, and nothing shows in usercp.

Can somebody help me out?

dsboyce8624 06-11-2005 08:26 PM

Quote:

Originally Posted by Lionel
The favorites links in navbar do not display on vbadvanced pages. Can you tell us what the globals names are? We need to add them in vbadvanced settings.

Found them. Needed to add those in vbadvanced settings:ermm:

lastfavpostbit
lastfavthreadbit

and for those with vbaLinks, you need to add those in your construct navbar function in includes/functions_links.php

global $lastfavpostbit;
global $lastfavthreadbit;

and finally hardcode the showthread.php and showpost.php in the global.php

What do you mean hardcode? More info please?

akanevsky 06-12-2005 11:11 AM

You need the code from global.php + the an appropriate template change for vbportal/vbadvanced/w/e.

dsboyce8624 06-12-2005 11:36 AM

Quote:

Originally Posted by Dark Visor
You need the code from global.php + the an appropriate template change for vbportal/vbadvanced/w/e.

And you're assuming I know what code you mean. And what template change.

akanevsky 06-13-2005 05:50 PM

Alright. IN the hack instructions, it tells you to add certain code to global.php. You would need to add the same code to vbadvanced's global.php. Then, make the template change that has to do with vbadvanced's navbar (the top one)...

yoyoyoyo 06-13-2005 06:13 PM

excellent job, thanks!

dsboyce8624 06-13-2005 06:47 PM

Quote:

Originally Posted by Dark Visor
Alright. IN the hack instructions, it tells you to add certain code to global.php. You would need to add the same code to vbadvanced's global.php. Then, make the template change that has to do with vbadvanced's navbar (the top one)...

Okay, I must be really having a bad day.

Far as I can tell vBadvanced has no global.php of its own, nor does it have a special navbar.

If it does I cannot locate them, or perhaps they are named differently.

akanevsky 06-14-2005 09:28 AM

I don't have vBAdvanced installed, so the only way I could help you is by taking a look at what you have there.. PM me.


All times are GMT. The time now is 04:15 AM.

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.01305 seconds
  • Memory Usage 1,830KB
  • 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
  • (5)bbcode_code_printable
  • (1)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete