Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard

Reply
 
Thread Tools
Secret Admirer / Crush System Details »»
Secret Admirer / Crush System
Version: 1.00, by buro9 buro9 is offline
Developer Last Online: Jul 2012 Show Printable Version Email this Page

Category: End-User Options - Version: 3.0.3 Rating:
Released: 02-15-2004 Last Update: Never Installs: 69
 
No support by the author.

No longer supported by the author.

Show Your Support

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

Comments
  #82  
Old 01-24-2005, 10:09 PM
carolmyt carolmyt is offline
 
Join Date: Jan 2005
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, mine installed just fine, with just one strange problem: the first time you click to send admiration, you get the duplicate phrase. I've double checked the code, and its all correct. Any ideas why this is happening?

You know, I think I may know what the problem is: I missed "NOTE: You must replace TABLE_PREFIX with the prefix that you use on your VB3
installation... OR remove it if you are not using a table_prefix." So . . . can somebody explain that to me? I'm new to the SQL queries. How do I know if I'm using a table prefix, and if I am, what it is?
Reply With Quote
  #83  
Old 01-25-2005, 05:00 AM
buro9 buro9 is offline
 
Join Date: Feb 2002
Location: London, UK
Posts: 585
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by carolmyt
Well, mine installed just fine, with just one strange problem: the first time you click to send admiration, you get the duplicate phrase. I've double checked the code, and its all correct. Any ideas why this is happening?

You know, I think I may know what the problem is: I missed "NOTE: You must replace TABLE_PREFIX with the prefix that you use on your VB3
installation... OR remove it if you are not using a table_prefix." So . . . can somebody explain that to me? I'm new to the SQL queries. How do I know if I'm using a table prefix, and if I am, what it is?
Good good, just got the email notification and thought... nope... not installed correctly.

The hack cunningly uses MySql trickery to detect duplicates... the trickery is that when two identical rows get inserted it causes an error. I detect the error and that's how I know that an admiration already exists.

However, it means I am basically masking MySql errors.

Anyhow... table prefix.

In your /includes/config.php file there is a bit that looks like this:
Code:
// Prefix that your vBulletin tables have in the database.
// For example: $tableprefix = 'vb3_';
$tableprefix = 'vb3_';
Now, in my instructions I ask you to do this:
Code:
DATABASE WORK

In phpMyAdmin or from the MySql command line, run the applicable piece of SQL.
NOTE: You must replace TABLE_PREFIX with the prefix that you use on your VB3
installation... OR remove it if you are not using a table_prefix.

FOR A FRESH INSTALL:

  CREATE TABLE TABLE_PREFIXsecretadmirer (
    userid INT(10) NOT NULL,
    admiresuserid INT(10) NOT NULL,
    datecreated INT(10) NOT NULL,
    PRIMARY KEY (userid, admiresuserid),
    KEY admiresuserid_ix (admiresuserid),
    KEY userid_ix (userid)
  ) TYPE = MYISAM;

FOR AN UPGRADE FROM A VB2 VERSION:

RENAME TABLE secret_admirer TO TABLE_PREFIXsecretadmirer;
Because you are a new install you are doing the CREATE TABLE bit.

Now, in that CREATE TABLE bit the first line says:
Code:
  CREATE TABLE TABLE_PREFIXsecretadmirer (
If your $tableprefix in your config.php file was blank (''), then that should be:
Code:
  CREATE TABLE secretadmirer (
If your $tableprefix in your config.php file contained vb3_ ('vb3_'), then that should be:
Code:
  CREATE TABLE vb3_secretadmirer (
So whatever your table prefix is... adjust the name of the database table to be created accordingly.

You only need to do this once, in that piece of SQL. The script can work it out when running, but because I didn't build an installer, I couldn't work out whether you have a table prefix.

Oh, and you will also want to run this which will delete the table that you made by accident:
Code:
  DROP TABLE TABLE_PREFIXsecretadmirer;


Hope that all makes sense to you
Reply With Quote
  #84  
Old 01-25-2005, 10:45 PM
carolmyt carolmyt is offline
 
Join Date: Jan 2005
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Perfectly clear, and now running perfectly! Many thanks!
Reply With Quote
  #85  
Old 01-25-2005, 10:56 PM
docvader's Avatar
docvader docvader is offline
 
Join Date: Dec 2002
Posts: 520
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Buro, I've looked in my phpadmin, and found a table called "TABLE_PREFIXsecretadmirer". Now, I have no table prefixes in my config file, so I'm not sure how this got created. And, the hack is working fine.

Suggestions???
Reply With Quote
  #86  
Old 02-02-2005, 01:20 PM
buro9 buro9 is offline
 
Join Date: Feb 2002
Location: London, UK
Posts: 585
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by docvader
Buro, I've looked in my phpadmin, and found a table called "TABLE_PREFIXsecretadmirer". Now, I have no table prefixes in my config file, so I'm not sure how this got created. And, the hack is working fine.

Suggestions???
See two posts above.

You must've run the SQL and then modified it to remove the TABLE_PREFIX bit and then ran it again. So just deleted the unused table
Reply With Quote
  #87  
Old 02-04-2005, 02:54 PM
carolmyt carolmyt is offline
 
Join Date: Jan 2005
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Would it be possible to make this feature accessible from the user's postbit? So if you wanted to register admiration, you wouldn't have to go to the profile.
Reply With Quote
  #88  
Old 02-10-2005, 02:49 AM
Wifey Wifey is offline
 
Join Date: Mar 2004
Posts: 250
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay here's my problem.

No longer have the blank page problem - for some reason when I FTPed the file it didn't come up with the entire code. Who knows.

Anyhow, the PM's aren't sending like they're supposed to and neither are the e-mails.

Any idea?
Reply With Quote
  #89  
Old 02-10-2005, 06:53 AM
buro9 buro9 is offline
 
Join Date: Feb 2002
Location: London, UK
Posts: 585
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ashkarita
Okay here's my problem.

No longer have the blank page problem - for some reason when I FTPed the file it didn't come up with the entire code. Who knows.

Anyhow, the PM's aren't sending like they're supposed to and neither are the e-mails.

Any idea?
Check the install guide again and verify that you did everything.

Note these bits:
Code:
PHRASE WORK:

Under the phrase type: Front-End Redirect Messages

Add these phrases:

secretadmirer_acknowledged
  Your admiration for that user has been successfully registered.

secretadmirer_duplicate
  You've already registered your admiration for that user.<br/> Maybe it's time to PM them and let them know you like them?

secretadmirer_report_sent
  Your secret admirer report has been dispatched to your registered e-mail address.

secretadmirer_limit
  Sorry! You may only admire a maximum of 5 people within the last month.
Reply With Quote
  #90  
Old 02-10-2005, 06:54 AM
buro9 buro9 is offline
 
Join Date: Feb 2002
Location: London, UK
Posts: 585
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ashkarita
Okay here's my problem.

No longer have the blank page problem - for some reason when I FTPed the file it didn't come up with the entire code. Who knows.

Anyhow, the PM's aren't sending like they're supposed to and neither are the e-mails.

Any idea?
Ooops. I replied above to the other problem

Check that you created the templates:
Code:
TEMPLATE WORK

For each of the text files, you need to add it as a template of the same name.
Change the values within them to match your forum and personal preference :)
There are five in total:

  secret_admirer_alert_email
  secret_admirer_alert_pm
  secret_admirer_match_email
  secret_admirer_match_pm
  secret_admirer_report_email
The text files are in the install Zip file.
Reply With Quote
  #91  
Old 02-10-2005, 06:55 AM
buro9 buro9 is offline
 
Join Date: Feb 2002
Location: London, UK
Posts: 585
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by carolmyt
Would it be possible to make this feature accessible from the user's postbit? So if you wanted to register admiration, you wouldn't have to go to the profile.
Yup, you just need to add the link:
Code:
<a href="profile.php?$session[sessionurl]do=admire&amp;userid=$userinfo[userid]">Register your admiration for $userinfo[username]</a>
You may need to check and change the $userinfo array name to match that of the post... but effectively you should add the above link to the relevant part of the postbit or postbit_legacy templates.
Reply With Quote
Reply

Thread Tools

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 11:24 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.07993 seconds
  • Memory Usage 2,300KB
  • Queries Executed 25 (?)
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
  • (9)bbcode_code
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_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
  • postbit_imicons
  • 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