vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Yet Another Awards System 3.5 v2.1.2 (https://vborg.vbsupport.ru/showthread.php?t=94836)

Arto 11-22-2005 02:08 AM

I recently converted a phpBB forum to vBulletin and at the same time migrated members' medals from phpBB's Medal System Mod v2.1.0 by ycl6 to YAAS v2.0.5. As the SQL table schemas for both award mods are very similar, this was fairly painless and can be accomplished through executing a few simple SQL statements. What follows is a quick how-to which hopefully will be useful for others looking to avoid manually importing the medals :)

First off, it is presupposed that you've imported your phpBB forum's data to vB using Jelsoft's ImpEx, that the import session is still active (that is, the importuserid field needs to exist in vB's user table) and that you've installed YAAS. Additionally, the queries are written for a situation where phpBB and vB share the same database, phpBB with the table prefix phpbb_ and vB without a table prefix; adjust to your specific setup where necessary.

The SQL queries can be executed from vB's admin panel (if you have the permissions), phpMyAdmin or the MySQL command-line client. (Needless to say, if you don't know understand what the SQL statements do, or are unable to adapt them to your specific situation, don't execute them!)

To begin, the following SQL statement will convert all medals from phpBB to YAAS, preserving the same row identifiers (which means you may get clashes unless you first delete the included example award in YAAS):

Quote:

INSERT INTO award SELECT medal_id AS award_id, -1 AS award_cat_id, medal_name AS award_name, medal_description AS award_desc, medal_image AS award_icon_url, medal_image AS award_img_url, 1 AS award_icon_url FROM phpbb_medal;
Note that the awards are imported as un-categorized; you will need to manually assign them to an award category in YAAS's admin panel before they'll show up in vB's front end.

Next, you need to copy all the medal/award images from phpBB's medals/ directory to the images/medals/ directory under your vB installation. The image paths also need to be corrected in the database, which can be done with the following two SQL statements (replace the URL http://www.yourforumsite.com/forum/ with your vB forum's base URL):

Quote:

UPDATE award SET award_icon_url = CONCAT('http://www.yourforumsite.com/forum/images/', award_icon_url);
UPDATE award SET award_img_url = CONCAT('http://www.yourforumsite.com/forum/images/', award_img_url);
Finally, the following SQL statement will import all issued awards to YAAS, mapping from the phpBB user to the correct vB member through the aforementioned importuserid field:

Quote:

INSERT INTO award_user SELECT m.issue_id, m.medal_id AS award_id, u.userid AS userid, m.issue_reason, m.issue_time FROM phpbb_medal_user m LEFT JOIN user u ON m.user_id = u.importuserid;
That's all, folks :) Though I migrated from the Medal System Mod v2.1.0, the instructions will likely work for newer versions as well (and could be enhanced to import award categories as well, which were introduced in the Medal System Mod v2.2.0).

paulmjno 11-23-2005 02:57 PM

I installed this, then disabled it almost immediately. It was causing MySQL errors throughout the whole board, and when I clicked the Award Manager options.

Dollah 11-25-2005 02:03 AM

installed thanx

mtha 11-25-2005 05:16 AM

Quote:

Originally Posted by dirtycrow
tried and failed. can i shoot you an e-mail with a copy of my memberinfo template? perhaps you can spot something I'm missing.

you can email or PM me via my profile.

giving me your website would be good too, so I can take a look ...

Quote:

I installed this, then disabled it almost immediately. It was causing MySQL errors throughout the whole board, and when I clicked the Award Manager options.
I'm not awared of anything like this should happen. if you could provide me more information, it'd be more helpful

(if there's bug in the hack, or you do anything wrong with it)

FamilyCorner 11-26-2005 06:33 PM

Just my 2 cents, I installed this without any problems at all and it's been running beautifully for a week now. In fact now I am taking votes on the next award we should create :)

Thanks again!

TosaInu 11-26-2005 08:02 PM

Sorry if this is already mentioned and me missing it:

-allow users to display the awards the like most in topicview, while the others show in profile.

Say only 3 awards are displayed, a user has 5 awards. Right now the 3 oldest awards are displayed in topicview. It's quite possible that the user is most proud about his new awards (recent, harder to get) and wants to display those.

Then you also have modest types who want to show only one or none in topicview :)

trackpads 11-26-2005 10:24 PM

mtha!

Great hack man! I am using it extensively on my site. As a mil guy there are a few additions if you could for the next release!

1. Allow awards to be resorted by weight, for example, allow us to choose higher ranking awards and those will be listed higher in a members postbit and profile.

2. Allow members to resort awards themselves?

3. Allow admin to choose which awards have the 'request awards' link and which ones do not. For example some awards cannot be request such as the member of the month etc etc.

4. Allow/disallow certain awards for certain usergroups

5. Allow members to comment on others' awards (congrats etc etc)

And thanks for all the work on this!!!!

mtha 11-27-2005 02:18 AM

Quote:

Originally Posted by TosaInu
Sorry if this is already mentioned and me missing it:

-allow users to display the awards the like most in topicview, while the others show in profile.

Say only 3 awards are displayed, a user has 5 awards. Right now the 3 oldest awards are displayed in topicview. It's quite possible that the user is most proud about his new awards (recent, harder to get) and wants to display those.

Then you also have modest types who want to show only one or none in topicview :)

dont understand what you are saying. but I am re-ordering the awards, so that newest awards are displayed first.

mtha 11-27-2005 03:17 AM

WORKING!


Quote:

1. Allow awards to be resorted by weight, for example, allow us to choose higher ranking awards and those will be listed higher in a members postbit and profile.
Done, with options to sort
">Order by issued time (newest first)
">Order by issued time (oldest first)
">Order by Award Order (ASC)
">Order by Award Order (DESC)

Quote:

2. Allow members to resort awards themselves?
you mean those who view member profile, can resort awards, or member who has award, can set display order setting?


Quote:

3. Allow admin to choose which awards have the 'request awards' link and which ones do not. For example some awards cannot be request such as the member of the month etc etc.
this will require some changes in database, will look into it. I myself dont use (and dont like) the request award feature, if you want, I can add them in, but still, the feature will not be fully supported :)


Quote:

4. Allow/disallow certain awards for certain usergroups
What do you mean by allow/disallow ...?

You admins are responsible for giving out awards, and you need to decide which award giving to which member (belong to which group). right?
I dont see the point of doing it, in adminCP

Quote:

5. Allow members to comment on others' awards (congrats etc etc)
same as rating, ... good idea but I cant do it right now. maybe in the future :)

akanevsky 11-27-2005 12:10 PM

Nice hack! Installed.


All times are GMT. The time now is 04:01 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.01485 seconds
  • Memory Usage 1,757KB
  • 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
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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