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

Reply
 
Thread Tools Display Modes
  #11  
Old 06-18-2003, 02:39 PM
buro9 buro9 is offline
 
Join Date: Feb 2002
Location: London, UK
Posts: 585
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I also need this and will help if someone needs me to. I am a developer in my job, though PHP is not what I work in, so it will take a short while to get up to speed.

Given that we are so close to VB3, I would like this in that ASAP... but as I believe I'll be on VB2.3 for the next few > 6 months I would like to start with this version and do a VB3 one once VB3 goes gold.

The way in which I envision it working is thus:

A button is on the profile page to nominate that you have a crush on person X.

This is registered in the database that Y fancies X and an email/PM is sent to X letting them know that someone has a crush on them and that they should use the profile pages to nominate someone they have a crush on to see if they get paired up.

If X then nominates Y an email/PM is sent to both parties letting them know they are matched and who the other person is... else the process continues until matches are made.

One database table will be required of two columns (that form a composite primary key - no duplicates)...
userid, fancies_userid
Or something like that.

Lastly, a little chunk should be offered within the user control panel to be able to manage these... i.e. to remove the people that you fancy when they offend you!

We're pretty much running a manual version of this at the moment... hence my knowing what needs doing

Cheers

David K
Reply With Quote
  #12  
Old 06-18-2003, 02:41 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 11:39 AM buro9 said this in Post #11
Given that we are so close to VB3, I would like this in that ASAP... but as I believe I'll be on VB2.3 for the next few > 6 months I would like to start with this version and do a VB3 one once VB3 goes gold.
Because releasing vB3 hacks is presently against the rules (vB3 is still beta), only a vB2 hack can be publicly released
Reply With Quote
  #13  
Old 06-18-2003, 02:53 PM
buro9 buro9 is offline
 
Join Date: Feb 2002
Location: London, UK
Posts: 585
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 04:41 PM filburt1 said this in Post #12
Because releasing vB3 hacks is presently against the rules (vB3 is still beta), only a vB2 hack can be publicly released
Well, that's ok, because I did say that we should start with VB2.3 now and then start on a VB3 one when it was gold.

Besides... we could start a VB3 hack now... just couldn't release it now. Certainly this should be encouraged since a lot of functionality provided by hacks in VB2.3 won't be there when VB3 does go gold, and thus to receive widespread support of VB3 and the continuity of user experience on these boards from the outset... hack makers should be encouraged to start thinking about such things and converting. If you want an example of when this sort of thing happened in the past, just think of the WinAmp debacle. WinAmp3 lacked skins, plugins, etc and this was a considerable factor in everyone I know staying with what they were comfortable with.

Either way... whilst I would need continuity (a hack I have in VB2.3 to exist for VB3 immediately after it went gold) I still actually said that we should do a VB2.3 one now, and thus this isn't the place for such a discussion or debate.
Reply With Quote
  #14  
Old 06-22-2003, 09:33 PM
insanctus's Avatar
insanctus insanctus is offline
 
Join Date: Feb 2003
Location: Michigan
Posts: 582
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone started on this hack?

I wish I had the skills to do it but I am still not that good with php to be hacking it all up from scratch
Reply With Quote
  #15  
Old 06-27-2003, 05:15 AM
buro9 buro9 is offline
 
Join Date: Feb 2002
Location: London, UK
Posts: 585
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I shall be starting on this next week. I have in my mind how it will work, which is outlined above.

Any suggestions should be made over the next few days and will be considered when I properly design the functions and logic flow.

Cheers

David K
Reply With Quote
  #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
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 10:57 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.04763 seconds
  • Memory Usage 2,295KB
  • 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
  • (2)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
  • (2)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