Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #16  
Old 06-27-2003, 05:34 AM
insanctus's Avatar
insanctus insanctus is offline
 
Join Date: Feb 2003
Location: Michigan
Posts: 582
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just installed vb3 So I will have to wait on this hack unless you need a vb3 tester

I been busting my but doing some add in's and working on a temp portal.
Reply With Quote
  #17  
Old 06-27-2003, 05:46 AM
buro9 buro9 is offline
 
Join Date: Feb 2002
Location: London, UK
Posts: 585
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm going to do a vb2 version first... but I'm coding it with the port in mind, so once done it should be easy to integrate into vb3 once that goes gold.
Reply With Quote
  #18  
Old 07-06-2003, 10:28 PM
buro9 buro9 is offline
 
Join Date: Feb 2002
Location: London, UK
Posts: 585
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, so this is the first draft... I wouldn't even call it a Beta Hack yet... it's just an outline of the idea. And you'll have to forgive any dodgy PHP (or point it out to me!) as this isn't my main language and I sorta make this stuff up.

So... first you need to create a database table:
Code:
CREATE TABLE `secret_admirer` (
  `userid` INT( 10 ) NOT NULL ,
  `admiresuserid` INT( 10 ) NOT NULL ,
  `datecreated` INT( 10 ) NOT NULL ,
  PRIMARY KEY ( `userid` , `admiresuserid` )
) TYPE = MYISAM ;
Note that it has a dual-column primary key to prevent duplicates existing.

Next... upload the attached file into the root of your form... i.e. the one in which index.php, member.php, etc exist. Usually /forum if you've followed standard naming conventions. The file should be called secret_admirer.php

Now... you need to edit member.php

Find:
PHP Code:
// ############################### start aim message ###############################
if ($action=="aimmessage") {
  
$templatesused 'aimmessage';
  include(
"./global.php");
  
$aim htmlspecialchars$aim );
  eval(
"dooutput(\"".gettemplate("aimmessage")."\");");


And below it add:
PHP Code:
// HACK : START : SECRET ADMIRER
// ############################### start admire ################################
if ($action=="admire") {
  
$templatesused 'secret_admirer_page, secret_admirer_duplicate_page';
  include(
"./secret_admirer.php");
  include(
"./global.php");
  
$userid verifyid("user",$userid);

  
//
  // We only let registered users, mods and such use this... no-one awaiting
  // confirmation or unregistered, as their email may be fake.
  //
  
if (!$bbuserinfo['userid'] or
      
$bbuserinfo['usergroupid'] == or
      
$bbuserinfo['usergroupid'] == or
      
$bbuserinfo['usergroupid'] == or
      
$bbuserinfo['usergroupid'] == 9) {
    
show_nopermission();
  }

  
//
  // Call the create function... this returns true or false:
  //   true = added successfully
  //   false = duplicate - it's been added before
  //
  
if (secretAdmirerCreate($bbuserinfo['userid'],$userid)) {
    
//
    // Successfully added admiration, so print out a helpful message
    //
    
eval("dooutput(\"".gettemplate("secret_admirer_page")."\");");
  } else {
    
//
    // Duplicated, so advise
    //
    
eval("dooutput(\"".gettemplate("secret_admirer_duplicate_page")."\");");
  }
  exit;
}
// HACK : END : SECRET ADMIRER 
You now need to add some templates to your system, these are just draft pieces of text to outline what each template does:
  • secret_admirer_page = "Your admiration for that user has now been registered and the user has been notified that someone admires them.<br/>
    <br/>
    If the user registers an admiration for you in return, then you will both be notified."
  • secret_admirer_duplicate_page = "You've already registered your admiration for that user."
  • secret_admirer_alert_pm = "Someone admires you!"
  • secret_admirer_alert_email = "Someone admires you!"
  • secret_admirer_match_pm = "$admiredUser[username] admires you!"
  • secret_admirer_match_email = "$admiredUser[username] admires you!"

Finally... modify the "getinfo" template to add a link to it somewhere:

<a href="member.php?s=$session[sessionhash]&action=admire&userid=$userinfo[userid]">Click here to register your secret admiration for $userinfo[username]</a>


Then... all the user has to do is click that link, and the system records their admiration... sends an alert to the other person (which will advise them to register their admiration for others in the hope of matching)... and when a match is made... the two users are both informed... otherwise, it's all secret

So yeah, first draft... six hours of plodding through... hope it all makes sense and looks good.

Please give feedback over this week, and I'll attempt to do changes which I feel are appropriate. For me though, what I've done fulfils my needs... thought about adding management stuff, but decided that this is one feature that should be totally anonymous and secretive... for privacy's sake.

Cheers

David K
Attached Files
File Type: php secret_admirer.php (6.8 KB, 9 views)
Reply With Quote
  #19  
Old 07-08-2003, 06:43 PM
buro9 buro9 is offline
 
Join Date: Feb 2002
Location: London, UK
Posts: 585
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Now moved to beta status... please help to find bugs.

https://vborg.vbsupport.ru/showthrea...threadid=55119
Reply With Quote
  #20  
Old 04-19-2009, 09:39 PM
rob01 rob01 is offline
 
Join Date: Sep 2008
Location: Mexico
Posts: 410
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this dosnt work anymore?
Reply With Quote
  #21  
Old 04-19-2009, 10:23 PM
tipoboy's Avatar
tipoboy tipoboy is offline
 
Join Date: Dec 2005
Location: scotland
Posts: 693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by rob01 View Post
this dosnt work anymore?

congratulations on reviving a 6 year old thread!
Reply With Quote
  #22  
Old 04-19-2009, 10:43 PM
rob01 rob01 is offline
 
Join Date: Sep 2008
Location: Mexico
Posts: 410
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

lol yeah, but it could be nice to have this back, i just want to know if someone is still using it so i could continue the development and/ask the author for permition

you don't need to be sarcastic
Reply With Quote
  #23  
Old 04-19-2009, 11:01 PM
Medtech's Avatar
Medtech Medtech is offline
 
Join Date: Oct 2007
Posts: 310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I could use this...
Reply With Quote
  #24  
Old 04-26-2009, 12:27 AM
Sweeks Sweeks is offline
 
Join Date: Jul 2008
Posts: 633
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would love this myself. Maybe have templates for the PM to be sent for members to choose from which are decorated etc
________
Blonde white
Reply With Quote
  #25  
Old 05-01-2009, 01:40 PM
Mrwill Mrwill is offline
 
Join Date: Apr 2009
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thumbs up
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 11:07 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.04315 seconds
  • Memory Usage 2,287KB
  • Queries Executed 12 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete