The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Comments |
#92
|
|||
|
|||
Installed and working perfectly....thanks a bunch....
|
#93
|
|||
|
|||
I like this idea and it would work perfectly on my board... is it Version 3.0.7 friendly?
I have a little concern though... spam. A lot of my members have chosen not to receive email from other members, and we don't send out any emails from the administrators... my concern is that people would now start to receive emails from the site they don't want. Plus, we have members that don't post, so I don't want them to be caught up in this when they are not interested. My ideas, if I may be so bold, would be to add that user must have a minimum of X number of posts before they can admire someone or receive admiration from someone and second to only receive emails if they have "receive emails from other members" enabled, otherwise the admirations are just sent to their report when they are ready to view. just a couple thoughts... but great idea! hope I can add it to my board soon! |
#94
|
|||
|
|||
Quote:
As for the no email thing... take a look through the code and comment that bit out, you'll find it's quit simple And you can also do the minimum posts thing... when you add the link to the member info page, just put a conditional around it to check that the post qty for that user is above whatever value you want to use |
#95
|
|||
|
|||
just a shot in the dark here, but in the "functions_secretadmirer.php" could I replace this
Code:
// // Send an email if we couldn't send a PM // if (!($notifyUser['options'] & $_USEROPTIONS['receivepm'])) { // // Get the Email message // Code:
// // Send an email if we couldn't send a PM // if (!($notifyUser['options'] & $_USEROPTIONS['receivepm'] & $vboptions['showemail'] & $vboptions['adminemail'])) { // // Get the Email message // am I close? :ermm: |
#96
|
|||
|
|||
Quote:
There are two bitflag fields that contain the bits that indicate whether a user allows emails on those two criteria. Those values are defined in includes/init.php Namely they are these rows in the $_USEROPTIONS array: 'adminemail' => 16, 'showemail' => 256, And the sum of the bits is the bitflag in $notifyUser['options']. You would perform the logic roughly like this, but beware, the & is not doing what you think it is... you might want to look at the PHP manual regarding bitwise operators. Code:
// // Send an email if we couldn't send a PM // if (!($notifyUser['options'] & $_USEROPTIONS['receivepm']) && ($notifyUser['options'] & $_USEROPTIONS['showemail']) && ($notifyUser['options'] & $_USEROPTIONS['adminemail'])) { // // Get the Email message // Bitwise operators can be daunting when you first encounter them, so let me show you very quickly how they work. Basically you take numbers that are of the power of 2. 1 2 4 8 16 32 If we presumed that they represented letters of the alphabet: 1 = A 2 = B 4 = C 8 = D 16 = E 32 = F Then we could build a value that encapsulated which of those letters we wanted to store. Example, we want to store options A and C... so it's 1 + 5 = 6. To store A, D, F it is 1 + 8 +32 = 41. Given any number you simply subtract the largest value you can to determine your options: 41 - 32 (F) = 9 9 - 8 (D) = 1 1 - 1 (A) = 0 So we know that 41 included the values for F, D and A. The options field basically stores a bitflag number like that, and the plain & in the logic is not the same as &&, but is a bitwise operator that indicates whether the bitflag contains the desired bits. So the example above should do it for you |
#97
|
|||
|
|||
I would say you know what you are doing... this is WAY out of my league!!! I am far from knowing anything about php, let alone hacking it... I just came up with that change by looking at other code in vb, which I am still very new to as well.... but if you say your change will work? thanks very much! love it! always want to avoid those unwanted emails for my members anyway I can...
thank you |
#98
|
|||
|
|||
Can anyone who has installed this hack successfully please help me with the DATABASE WORK i do not understand this part below help please
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; |
#99
|
|||
|
|||
Quote:
In your ./includes/config.php file you have a setting named $table_prefix. In the first line of this query is this line: CREATE TABLE TABLE_PREFIXsecretadmirer ( If your table prefix setting = "vb3_" then you should change that line to: CREATE TABLE vb3_secretadmirer ( If your table prefix setting = "forum_" then you should change that line to: CREATE TABLE forum_secretadmirer ( If your table prefix is blank or empty then you should change that line to: CREATE TABLE secretadmirer ( Once your have made that change then you should run that SQL query in a program like PhpMySql and it will create the table for you |
#100
|
|||
|
|||
i seem to be getting a blank page when click on the admiration link on the profile, i have done everything except this section - i really couldnt understand it:
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. -- where on earth do you add this? vb version: 3.07 any help would be greatly appreciated |
#101
|
|||
|
|||
In your admin control panel, in the left hand menu:
AdminCP > Languages & Phrases > Phrase Manager And then at the bottom of the page there is an "Add New Phrase" button. When you add a phrase it asks you three things: Which group to put them in: The answer = Front-End Redirect Messages What the phrase name is: These are the lines like: secretadmirer_acknowledged What the phrase text is: These are the lines like: Your admiration for that user has been successfully registered. You need to insert each phrase. I need to build an installer |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|