vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   End-User Options - Secret Admirer / Crush System (https://vborg.vbsupport.ru/showthread.php?t=61632)

buro9 02-26-2004 10:30 AM

Quote:

Originally Posted by Rampag33
Install no problems to report yet

Thx!

I have it set to 3 admirations in a month and the only error was human error forgot to remove the table_prefix on installation :)

Thx for a great hacc

Cool, I've run it for a week without trouble too... so I've just updated the zip file in the first post to reflect the addition of the limiting code.

PranK 03-12-2004 01:05 AM

ha ha ha - awesome hack.... however, i dont know if my car community (consisitng 95% of males) would enjoy it. :)

good work anyway!

Christian

Leah 03-13-2004 12:41 AM

Is it possible to have the secret admirer report sent to the users PMs instead of via email?
There's something with the server configuration here that blocks all of the forums sent out emails. :(

weaver 03-27-2004 04:46 PM

Quote:

There is also a control panel option for the user to have a report e-mailed to
them showing them how many people admire them, their matches, etc.
Where is this located?

**Never mind - I found it. But what should the text of the report say? Right now it just says "secret_admirer_report_email".

buro9 03-27-2004 06:01 PM

Quote:

Originally Posted by snobbymom
Where is this located?

**Never mind - I found it. But what should the text of the report say? Right now it just says "secret_admirer_report_email".

It should look like this:
https://vborg.vbsupport.ru/attachmen...chmentid=16862

And the zip file contains the TXT file named:
secret_admirer_report_email.txt

Of which the content is:
Code:

Hiya $bbuserinfo[username], here is you Secret Admirer report as requested.

Thus far, you have registered your admiration for $totalUserAdmires forum users... and in turn, $totalAdmiresThisUser users have registered their admiration for you.

Here are the people that you have successfully matched with:
$matchedUsersText

Here are the people whom you have registered your admiration, but have not yet matched with:
$unmatchedUsersText

You still have $totalOutstandingUsersWhoAdmireThisUser users who admire you, whom you have not yet matched with.

:)

And the install file says:
Quote:

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
So it's all there :)

weaver 03-27-2004 06:41 PM

Thanks! :) I saw that about the txt files but didn't know where they were. Thanks again :)

chris frolic 04-02-2004 06:01 AM

Great hack.

I found a small avatar you can use for Roger Lodge, host of America's Blind Date. Much funnier to use for us folks on this side of the pond.

https://vborg.vbsupport.ru/

buro9 04-02-2004 05:02 PM

Quote:

Originally Posted by chris frolic
Great hack.

I found a small avatar you can use for Roger Lodge, host of America's Blind Date. Much funnier to use for us folks on this side of the pond.

http://www.99x.com/morningx/images/RLODGE.jpg

Thanks, I'll add it to the zip to make it easier for others too :)

chris frolic 04-02-2004 08:33 PM

For his user info I put his website as www.blinddatetv.com and location is Los Angeles. I don't know of a birth date for him though. I also changed all the templates to say Roger instead of Celia. My users were laughing their asses off having Roger Lodge run the crush system.

RugBurn 04-06-2004 12:41 AM

This is just whay my Singles board needs, but I am using 1&1 for hosting and I don't know if it will allow me to set up the table prefixes. They don't really let you access the database manually. Has anyone using 1&1 tried this yet?

buro9 04-06-2004 07:25 PM

Quote:

Originally Posted by RugBurn
This is just whay my Singles board needs, but I am using 1&1 for hosting and I don't know if it will allow me to set up the table prefixes. They don't really let you access the database manually. Has anyone using 1&1 tried this yet?

It should work anywhere. So long as you have been able to install vbulletin you should be fine to install this hack.

Sure, you may need to create the database table by pasting the code into PhpMyAdmin or something like that (even vBulletin lets you run SQL in the AdminCP!), but the simple bit is that if you had permissions to create the vbulletin database originally and can perform updates (which usually modify tables), then you pretty much should be fine to proceed with this hack :)

RugBurn 04-06-2004 08:12 PM

Thanks buro9. I will look over it again. I am thinking that this may be a little over my head as far as the install goes, but I do want to get it done. Luckily, I think I can get a friend to do it for me.

Majik? 04-06-2004 10:32 PM

Quote:

Originally Posted by RugBurn
This is just whay my Singles board needs, but I am using 1&1 for hosting and I don't know if it will allow me to set up the table prefixes. They don't really let you access the database manually. Has anyone using 1&1 tried this yet?

Why can't you? Install phpMyAdmin to be able to easily work with your dBase in your favourite browser. As for table prefixes, you decide if you're going to use them or not when you install vB initially. If by prefixes your just meaning the new tables this hack uses, you can create them by running the queries in your AdminCP.

RugBurn 04-12-2004 09:32 PM

/me clicks Install

Thanks for this great hack.

RapCheck 07-20-2004 04:23 AM

Install went easy. Appears to be working fine. Thanks.

venomx 09-03-2004 11:27 PM

For this:
$EXCLUDED_USERGROUPS = array(1,3,4,9,12);
Can we leave it blank so everyone can use it?

buro9 09-04-2004 07:35 AM

Quote:

Originally Posted by venomx
For this:
$EXCLUDED_USERGROUPS = array(1,3,4,9,12);
Can we leave it blank so everyone can use it?

You can leave it blank, however you probably will find that you do want to exclude the unregistered users because:
* Spiders such as Google will follow the link and trigger false admirations.
* You can only have 1 unregistered user perform an admiration because of the way the database table works.
* The admired person wouldn't be able to reciprocate against an unregistered user as the unregistered user couldn't be notified by either mail or PM that a match occured.

So whilst you can remove the usergroups such as banned users, etc... you really should leave in the unregistered usergroup as otherwise it will be a bit of a mess,

venomx 09-04-2004 07:44 AM

Yeah never thought about that... Just seen all them numbers and I belive since I am an admin I was in group 1... Why would I want to disallow admins?

buro9 09-04-2004 07:57 AM

Quote:

Originally Posted by venomx
Yeah never thought about that... Just seen all them numbers and I belive since I am an admin I was in group 1... Why would I want to disallow admins?

Look at usergroups in your control panel:

1 = Unregistered
3 = Awaiting Email Confirmation
4 = COPPA Awaiting Confirmation

And then I have a couple of custom ones which I'm sure if you have the equivalent of you want to exclude too:

9 = Miserable Users (See the miserable users hack)
12 = Banned

So Admins, etc can all use it, but those who are anonymous or inactive are excluded, and those whom the board have banned or taken action against are also excluded.

venomx 09-04-2004 08:07 AM

DUH I feel stupid now hehe
I keep thinking when I see 1 that its me because I am user 1..
Have not hacked a board in a long time and just setting up a new site with VB3 and going to shut down an old one that uses VB2* as soon as the new site is set up how I want it.

Thanks!

venomx 09-04-2004 06:30 PM

Just had a great idea.... but may send too many emails...
send valentines cards on feb 14 from the admirers... ;p

robert_2004 09-29-2004 03:45 PM

it is a really good mod, but i don't want to install it if i don't have any control over it.
i really need an admin section to check users aren't adding literally everyone to their list, and i need to be able to monitor new guests (like perverts and such ((as i run a teenager forum for a certain location )) and make sure people with 0 - 20 posts aren't adding more than 1 or 2 people )
some equation like, 1 person added per 10 posts (without informing them they need to post more to receive another, but rather inform them they will receive another slot "very soon" )

buro9 09-29-2004 09:41 PM

Quote:

Originally Posted by robert_2004
it is a really good mod, but i don't want to install it if i don't have any control over it.
i really need an admin section to check users aren't adding literally everyone to their list, and i need to be able to monitor new guests (like perverts and such ((as i run a teenager forum for a certain location )) and make sure people with 0 - 20 posts aren't adding more than 1 or 2 people )
some equation like, 1 person added per 10 posts (without informing them they need to post more to receive another, but rather inform them they will receive another slot "very soon" )

I'll look at building X admirations per Y post count as an option.

This can be an alternative method of prevent flooding alongside the time based method currently available.

I could also do a usergroup based permissioning, this would let you use promotions to control the availability of the secret admirer thing via thresholds that you define through the promotion system.

Thus far there is no reporting whatsoever, and I'm afraid that whilst I understand your concerns re: perverts, I shall not be building a reporting system for this as I do not want my users to believe that just because I created a reporting function I do such things as examine who admired who, etc.

However, I'm not a closed source hack writer, and anyone who wants to make such changes and additions can do, and I will happily roll them into the first post for new vBulletin admins to get if they wish to use reporting tools with this hack.

FleaBag 10-11-2004 12:52 AM

This is what I'm getting...

Quote:


Parse error: parse error in /www/dragonninja/includes/functions_secretadmirer.php on line 109

Fatal error: Call to undefined function: secretadmirercreate() in /www/dragonninja/profile.php on line 2647
Any ideas?

buro9 10-11-2004 07:59 AM

Strange, no-one else has had this problem.

The function it can't find is within the functions_secretadmirer.php file that you should have uploaded to your includes folder.

Could you check that you have done this.

If you have done this, have you changed your includes folder from the default path (it's looking relative to the profile.php file for a subfolder named 'includes').

If you have done both of those... have you in any way modified the chunk of code that the install instructions asked you to put into profile.php? Specifically the chunk of logic that currently looks like thus:
PHP Code:

// HACK : START : SECRET ADMIRER
if ($_REQUEST['do'] == 'admire') {
  require_once(
'./includes/functions_secretadmirer.php');
  unset(
$admiresUserId);
  unset(
$admireStatus);
  
$admiresUserId verify_id('user'$_REQUEST['userid']);
  
$admireStatus secretAdmirerCreate($bbuserinfo['userid'], $admiresUserId);
  switch (
$admireStatus) {
    case 
'DONE':
      
$_REQUEST['forceredirect'] = 1;
      eval(
print_standard_redirect('redirect_secretadmirer_acknowledged'));
      break;
    case 
'DUPLICATE':
      
$_REQUEST['forceredirect'] = 1;
      eval(
print_standard_redirect('redirect_secretadmirer_duplicate'));
      break;
    case 
'LIMIT':
      
$_REQUEST['forceredirect'] = 1;
      eval(
print_standard_redirect('redirect_secretadmirer_limit'));
      break;
  }
}
if (
$_REQUEST['do'] == 'admirereport') {
  require_once(
'./includes/functions_secretadmirer.php');
  
secretAdmirerReport($bbuserinfo['userid']);
  
$_REQUEST['forceredirect'] = 1;
  eval(
print_standard_redirect('redirect_secretadmirer_report_sent'));
}
// HACK : END : SECRET ADMIRER 

Therein lies the function calls and the include statement. If it cannot find the file containing the functions within the includes folder then it will not be able to call the function :)

Try that first (checking the file is where it should be).

Cheers

David K

FleaBag 10-11-2004 08:11 AM

All of my forum files are in the site root, and my includes folder is a subdirectory of this. I have added the code to profile.php as required...

I guess I should have also let you know that I get this error when clicking the link in the profile, to register romantic interest... Just to let you know. I was also admiring myself as a test - this seemed to work when I had 3.01 installed - it was working 100% [I'm now re-hacking for the 3.03 upgrade]. I'm usually pretty good at tracking errors down, even though I'm not too PHP savvy, but this is beyond me heh.

Thanks for your time buro9.

Wifey 10-12-2004 03:31 AM

I'm getting a database error when I click to get the report. Also, when I try to admire someone to test it, it says it's a duplicate. Any ideas?

FleaBag 10-26-2004 03:29 PM

I've still not fixed this. Anyone having a similar problem?

buro9 10-29-2004 09:41 AM

Quote:

Originally Posted by FleaBag
I've still not fixed this. Anyone having a similar problem?

Sorry, I'm in the wrong country, but if you could send me your profile.php file I could see whether anything is obviously wrong.

You did upload the two files into the includes directory right?

Do you have a phpinfo page accessible too? Not that I can imagine why this doesn't work.

RWDF1 11-21-2004 10:16 PM

I am trying to install this, but I dont understand the mySQL part. could someone explain how I install this part in more detail please. The rest seems fairly striaght forward.

Thanks

Robert

iiyoN 11-29-2004 06:20 PM

thx ^^ it workx :D

buro9 11-29-2004 06:51 PM

Quote:

Originally Posted by iiyoN
thx ^^ it workx :D

Cool, you figured out the phrases :)

The next bit, template creation.

Go to:
AdminCP > Styles & Templates > Style Manager

Then for each style... or just one if you have a master one... you need to add those text files as templates.

This is done by using the drop down select list and choosing Add Templates.

The title of each template is the name of the text file, and the contents of each file is the content of each text file :)

Couldn't be easier :D

Well... it could... but hey, this helps you learn the AdminCP stuff anyway ;)

ShaanuJaanu 12-06-2004 11:56 PM

it keeps on saying....uve already registered ur admiration for the member....(no..i didnt register....it says the samething for everyone)

why is that?

buro9 12-07-2004 12:45 AM

Quote:

Originally Posted by ShaanuJaanu
it keeps on saying....uve already registered ur admiration for the member....(no..i didnt register....it says the samething for everyone)

why is that?

You've created the database table right?

I use a MySql index trick to determine whether duplicates are being made... but the essence of that is that I catch a database error.

So if you have database errors, it would incorrectly report it as being a duplicate.

So:
1) Check that the table exists and that you ran the SQL correctly.
2) Check that the table doesn't need repairing.

You can use phpMyAdmin to do both of those :)

FleaBag 12-13-2004 02:01 PM

buro9, where should I send the file?

Thanks!

buro9 12-13-2004 02:14 PM

Quote:

Originally Posted by FleaBag
buro9, where should I send the file?

Thanks!

PM Sent

FleaBag 12-13-2004 02:29 PM

Hi David, email sent... Thanks a lot! :)

FleaBag 12-13-2004 10:18 PM

All working now! Woohoo! :D

MikaK 12-21-2004 02:33 PM

Extremely Cool! *install*

-Mika-

Soto 01-14-2005 11:42 AM

Working ok on swanseasucks.com

Although had to edit one of the templates as by default it has an extra /forum/ which wasn't necessary in my case for linking to the memberlist.

Hopefully when my site gets a bit busier with a better male/female ratio it'll become quite fun. Looking forward to Valentines with this one....


All times are GMT. The time now is 11:36 AM.

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.01331 seconds
  • Memory Usage 1,850KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (15)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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