[ABD] Forum Favorites 1.0.5

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Locked
User avatar
Agrajag
Registered User
Posts: 124
Joined: Sun Jan 13, 2008 12:39 am

[ABD] Forum Favorites 1.0.5

Post by Agrajag » Mon Jan 14, 2008 3:42 am

MOD Title: Forum Favorites
MOD Description: Adds a spot in the UCP for a user to enter their favorite movies/shows/comics/etc. Categories can be set through the ACP. The favorites lists show up in the user's profile. There is forum-wide favorites page, that shows the most popular items based on how many users have entered them into their profiles. Each item can also optionally have a URL that will make that text a hyperlink in the user's profile.
MOD Version: 1.0.5

Demo board: None

MOD Download: Download via GitHub

Mod Source Code at GitHub: http://github.com/arrakis/Forum-Favorites/tree/master

Update 06/07/09: v1.0.5
  • Fixed bugs that threw errors in debug mode.
  • Added icon legend to forum list page
Update 10/09/08: v1.0.4
  • Code cleanup. Removed some old/commented code that had been accidentally left in.
Update 10/08/08: v1.0.3
  • Cleanup requested by MODDB validators
Update 9/19/08: v1.0.2
  • Fixed numerous bugs and phpBB coding standard failures reported during MOD validation of v1.0.0
  • Image icons are now part of the style you have set, so you can have different icons for different styles. This also means you have to refresh your style's imageset through the ACP after installing the mod for the icons to show up.
  • Icons for the link on the header bar have been added for both styles.
  • Renaming and deleting categories is now logged in the Admin log.
  • Activating/deactivating categories now instantly brings you back to the category list without displaying a success message.
  • Edited favorite list template to work around IE6's poor handling of the Button element. The Add/View Users buttons should now work as expected in IE6.
  • Slightly altered SQL schema. If you are updating from a previous version, see this post for the SQL queries necessary to change from the old schema to the new.
Update 9/14/08: v1.0.1
  • The Add/View Users buttons on the Forum Favorites pages now work with special characters (non-ASCII)
  • Fixed bug on prosilver template where the Add/View buttons wouldn't work if you had them set to display in their own column.
  • Fixed some error checking bugs. Empty favorites (blank lines) are no longer allowed
Update 9/01/08: v1.0.0
  • First official release (RC1)
  • Fixed current category display so it is actually correct all the time.
  • The prosilver template now prominently displays the current category you're viewing.
  • Fixed favorite list so it won't show lists for deactivated categories (previously you could change the URL and it would display any list, even if it should have been deactivated).
  • You can now delete categories through the ACP. This deletes all info entered by users for that category too, so if you think you might want that info back later just deactivate the category instead.
  • Removed the "default category" option from the ACP (not sure if it even worked correctly anyway). The favorite list page now displays whatever the first ordered category is when the user first views the page.
  • Fixed the "favorite list length" option in the ACP so it actually works correctly.
  • Fixed some bugs for calculating the forum favorites lists.

Update 8/29/08: v0.5.2
Added workaround for IE's poor implementation of submit buttons so that the Add and Search buttons work.

Update 8/29/08: v0.5.1
Fixed small bug that made the current category display incorrectly on the subsilver2 theme. If you had 0.5.0 installed, the only changed file is /includes/ucp/ucp_favorites.php (or you can manually edit the one changed line in the file per the instructions in this post)

Update 8/28/08: v0.5.0
Updated to MODX 1.2.0
Added subsilver2 installation instructrions (in install_subsilver2.xml).
Small edit added to common.php and change to edit in overall_header.html to conform to phpBB standards.

Update 8/04/08: v0.4.1
Fixed a bug in the functions_favorites.php file that caused the mod to not work on users using MySQL 4. There are no other differences, if you are using 0.4.0 with MySQL 5 there is no need to update. If you are upgrading from 0.4.0, the only changed file is /includes/functions_favorites.php

Update 2/22/08: v0.4.0
The Forum Favorites list is now calculated when users edit their favorites and stored in the database, instead of being recalculated every time the page is opened. This should improve performance on boards with lots of users.
There is now a button next to each item on the Forum list that brings up a list of all the users who have that favorite listed, and links to their profiles.
The add favorite button has been replaced by an image to fit in better with the prosilver theme.
A link to the Forum Favorites page has been added to the overall site header.
Fixes and improvements to the way the profile page displays favorites info.

Update 2/09/08: v0.3.1
Fixed a bug in the ACP module. Fixed a bug where the first Add button in the Forum Favorites list wouldn't work. Added ACP setting to change position of Add button (before text, after text, or in separate column).

Update 2/09/08: v0.3.0
The overall forum list now shows the most popular URL that exists for each item. It also adds a + button that lets the user add that item to their own list (I updated the screenshot below to show this). Updating lists also now use update statements instead of delete/insert statements to make it less likely that a server/sql error will result in lost data. I've also changed the mod status from Alpha to Beta, since I think it's pretty stable and has most of the main features included now.

Update 2/02/08: v0.2.0
There is now an ACP mod to change some settings and manage your categories. It also fixes a bug where when you viewed someone's profile it would always show your favorites instead of theirs, and prevents users from entering the same favorite twice in the same category.

Update 1/21/08: v0.1.0a
Added an edit to 'includes/constant.php' that I forgot in the initial release. If you already downloaded 0.1.0 and don't want to redownload the whole .zip file, the edit I left out can be found in this post.

Update 1/20/08: v0.1.0
An alpha version of the code is up, download links is above. This version has all the basic functionality in place, but is still pretty rough around the edges. It probably doesn't comply to phpBB coding guidelines, since I was focused more on getting everything working first. There's also no Admin page to set up categories, you have to alter it through SQL directly. There's also no SQL error checking, so missing field information might cause it to break. It should still work pretty well though, all the basic features have worked fine in my testing.

Screenshots:
Image
Image
Image
Image
Image
Image
Image
Last edited by Agrajag on Sun Jun 07, 2009 7:20 pm, edited 34 times in total.

User avatar
ThunderCrew
Registered User
Posts: 1438
Joined: Sat Jun 30, 2007 6:26 pm
Location: Ill, Usa
Contact:

Re: [DEV] Forum Favorites

Post by ThunderCrew » Wed Jan 16, 2008 1:12 pm

Looks nice 8-) waits for future of it.
Ugg im a t0tal newb again ...... 2 years off cant remember jack ... time to get to it

User avatar
jwxie
Registered User
Posts: 392
Joined: Wed Feb 01, 2006 3:45 am
Contact:

Re: [DEV] Forum Favorites

Post by jwxie » Wed Jan 16, 2008 5:07 pm

pretty cool.
It's a nice try. :P
Great job, and waiting too :mrgreen:

moustafamin
Registered User
Posts: 230
Joined: Thu Aug 30, 2007 8:10 am

Re: [DEV] Forum Favorites

Post by moustafamin » Wed Jan 16, 2008 8:29 pm

can you make this box accept html??

User avatar
jwxie
Registered User
Posts: 392
Joined: Wed Feb 01, 2006 3:45 am
Contact:

Re: [DEV] Forum Favorites

Post by jwxie » Wed Jan 16, 2008 9:43 pm

moustafamin wrote:can you make this box accept html??
from his screenshot, i think it's auto replacement with the string, converting the url..
and yeah, i think his method is just using the default bbcode :mrgreen: :mrgreen:
html will be nice though, but why? (personal question)

User avatar
Agrajag
Registered User
Posts: 124
Joined: Sun Jan 13, 2008 12:39 am

Re: [DEV] Forum Favorites

Post by Agrajag » Sun Jan 20, 2008 10:02 pm

I'm not making it accept html because I feel like that will just create problems. You can add a URL link though and it will display as a hyperlink.

I've made a lot of progress, I'm just ironing out a few bugs in the multiple-category display code, I should have some Alpha code out for you guys to look at soon.

User avatar
gawaindc
Registered User
Posts: 100
Joined: Thu Jun 14, 2007 1:54 pm

Re: [DEV] Forum Favorites

Post by gawaindc » Sun Jan 20, 2008 11:50 pm

Agrajag wrote:I've made a lot of progress, I'm just ironing out a few bugs in the multiple-category display code, I should have some Alpha code out for you guys to look at soon.
Great, looking forward to testing this one :D

User avatar
Agrajag
Registered User
Posts: 124
Joined: Sun Jan 13, 2008 12:39 am

Re: [ALPHA] Forum Favorites

Post by Agrajag » Mon Jan 21, 2008 2:12 am

Alright, an initial release is now available to download. Link is in the first post. The basic stuff works, but it needs some more changes for things like Admin controls. I'm also going to add buttons on the Forum Favorites page for "Add this to your Favorites" and more sorting options, as well as a page to see everyone who has a specified Favorite in their profile. And of course I have to fix things up to comply to phpBB coding standards. And I also need to move the Forum Favorites link to somewhere not in the UCP, since that doesn't make sense (it's just more convenient to leave it there than have to edit another page to insert the link, the final version will put it in the forum header).

I'm not sure how to handle URLs on the overall most popular list. Each indivdual person has the URL stored separately, so I'm not sure how to have it choose the one to use on the overall forum page. What I've come up with is
1) No hyperlinks on the most popular page. Not a very good choice (what it does now)
2) Have the link be whatever URL is most popular/common. An ok choice, but it might take a bit to run through and check that each time the page is loaded. I could cache it somewhere on the server but then it gets more complicated than I want right now.
3) Have whoever enters the favorite first set the default URL. Not a great choice, but probably the one I'm going to use, at least until I get a better idea.
4) You can only add items to your favorites from a pre-determined list of names and URLs. Also not a great idea, but I might eventually add this as an extra feature since I can see how it might be useful in some cases.

Right now I'm going to do option 3, and add in an admin/mod ability to change the URL if it's wrong. Anyone else have a better idea?

moustafamin
Registered User
Posts: 230
Joined: Thu Aug 30, 2007 8:10 am

Re: [ALPHA] Forum Favorites

Post by moustafamin » Mon Jan 21, 2008 5:35 am

coooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooool :D

finish it plz

frechdaxx
Registered User
Posts: 96
Joined: Tue Apr 10, 2007 1:56 pm
Contact:

Re: [ALPHA] Forum Favorites

Post by frechdaxx » Mon Jan 21, 2008 1:34 pm

Cool!! :) Can't wait for this!

flexx
Registered User
Posts: 75
Joined: Thu Aug 30, 2007 8:16 pm

Re: [ALPHA] Forum Favorites

Post by flexx » Mon Jan 21, 2008 2:59 pm

when I browse my browser to my own profile (http://www.yourdomain.com/memberlist.ph ... rofile&u=2) I get this

Code: Select all

SQL ERROR [ mysql4 ]

Table 'klaiks.favorites_user_table' doesn't exist [1146]

SQL

SELECT favorites_category_id,favorites_listitem_text, favorites_listitem_url FROM FAVORITES_USER_TABLE WHERE user_id = 2 ORDER BY favorites_category_id,favorites_listitem_id

BACKTRACE


FILE: includes/db/mysql.php
LINE: 158
CALL: dbal->sql_error()

FILE: memberlist.php
LINE: 574
CALL: dbal_mysql->sql_query()
:| :cry: what should I do?

frechdaxx
Registered User
Posts: 96
Joined: Tue Apr 10, 2007 1:56 pm
Contact:

Re: [ALPHA] Forum Favorites

Post by frechdaxx » Mon Jan 21, 2008 3:07 pm

Do the SQL updates provided wit this mod ;)

flexx
Registered User
Posts: 75
Joined: Thu Aug 30, 2007 8:16 pm

Re: [ALPHA] Forum Favorites

Post by flexx » Mon Jan 21, 2008 3:37 pm

frechdaxx wrote:Do the SQL updates provided wit this mod ;)
but I've allready done it

User avatar
Agrajag
Registered User
Posts: 124
Joined: Sun Jan 13, 2008 12:39 am

Re: [ALPHA] Forum Favorites

Post by Agrajag » Mon Jan 21, 2008 10:05 pm

Oh, I realized I forgot to include an edit in the modx file, whoops!

Open 'includes/constants.php' and at the bottom after

Code: Select all

// Additional tables
add this:

Code: Select all

define('FAVORITES_USER_TABLE',		$table_prefix . 'favorites_user');
define('FAVORITES_CATEGORY_TABLE',		$table_prefix . 'favorites_category');
Sorry, I'll go back and add this to the .zip file.

Also make sure you went in and set up your category names through SQl in the correct table.

flexx
Registered User
Posts: 75
Joined: Thu Aug 30, 2007 8:16 pm

Re: [ALPHA] Forum Favorites

Post by flexx » Tue Jan 22, 2008 3:13 pm

Agrajag wrote:Oh, I realized I forgot to include an edit in the modx file, whoops!

Open 'includes/constants.php' and at the bottom after

Code: Select all

// Additional tables
add this:

Code: Select all

define('FAVORITES_USER_TABLE',		$table_prefix . 'favorites_user');
define('FAVORITES_CATEGORY_TABLE',		$table_prefix . 'favorites_category');
Sorry, I'll go back and add this to the .zip file.

Also make sure you went in and set up your category names through SQl in the correct table.
thank you..but now I have antoher problem..I can't edit my favorites and in My Profile I only can see
{ FAVORITES }
:cry:

Locked

Return to “[3.0.x] Abandoned MODs”