vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   How to pass users pw through email? (https://vborg.vbsupport.ru/showthread.php?t=285376)

John Lester 07-12-2012 12:22 AM

Yes I saw that unsubscribe auth link while going through the phrases for email body text. I also saw a couple of links that led to the usercp being used as unsubscribe links.

Either way, what you've done works awesome as far as my host is concerned, and I've already gone though all of the email body text phrases adding the link to your mod and removing any others I found.

I suppose I could have done it the other way around, but I didn't look at what the unsubscribe links did and felt my way was just ... easier :D

No problem at all with the release not being tonight :) I'll do some more sleuthing when it cools off here in regards to the smilie page issue and get back to you.

--------------- Added [DATE]1342060732[/DATE] at [TIME]1342060732[/TIME] ---------------

Ok the message that pops up is - could not find phrase unsubscrib_done and then sends me to the index page :D

You are correct, turning off "receive admin emails" does not stop thread subscriptions (and I'm going to assume group and others as well), and I think I figured that out yesterday which is why I added the condition to set thread subscriptions to "do no subscribe". I figured doing that and adding the unsubscribe link would be enough to cover my butt ... and the host agrees. In fact they wonder why I bothered adding all of that other stuff ... but screw them they suck :D

ForceHSS 07-12-2012 01:35 AM

You should post this as a plugin once all bugs are worked out

John Lester 07-12-2012 01:54 AM

Quote:

Originally Posted by ForceHSS (Post 2347162)
You should post this as a plugin once all bugs are worked out

I believe he (Kevin) intends to do just that :)

--------------- Added [DATE]1342065400[/DATE] at [TIME]1342065400[/TIME] ---------------

Quote:

Originally Posted by John Lester (Post 2347148)
Ok the message that pops up is - could not find phrase unsubscrib_done and then sends me to the index page :D

I figured out why this was happening. During my sleep deprived state last night comparing the new version and the old version I accidentally copied over a snipet of code from the old version and imported the contaminated version to my live site :D Once I removed the code everyone works properly now :)

kh99 07-12-2012 08:25 AM

OK, I'm glad you got the error message worked out. Sounds like you've pretty much got yourself straightened out. As fo rthe thread subscription unsubscribe links, I had a look and it's actually pretty much the same thing we're doing. The auth code is a hash of the user id and subscription id, and it's used to unsubscribe without needing to log in, the same as we're using the email address. I think in general it might still be useful to expand the page on our mod to let the user choose what they want to unsubscribe from, and have an "I don't want any more email" box.

When you said your host "wonders why you bothered adding all of that other stuff", what do you mean exactly - that you added another unsubscribe link to the subscription emails?

In any case, do you need anything else? If you're all set with your host I'll just take my time (...and probably never get it released :) ).

Simon Lloyd 07-12-2012 08:34 AM

Quote:

Originally Posted by kh99 (Post 2347210)
In any case, do you need anything else? If you're all set with your host I'll just take my time (...and probably never get it released :) ).

That would be a crying shame as that should be built in to vb!

kh99 07-12-2012 08:42 AM

Yeah, I was just joking because that's happened to me with a few other mods - that I have them virtually complete then never actually get around to releasing them. I'll make sure I get this one done.

John Lester 07-12-2012 02:59 PM

I want to run a couple of tests today with regards to the thread subscriptions. Mainly I want to know if setting the default to 'do not subscribe' will prevent existing subscriptions from sending emails. If it does not, then I'd test to see if setting the default to 'control panel' stops sending emails for existing subscriptions. That way we don't have to delete existing subscriptions :) I'll actually be doing that after this post :D

If either one of those works, then you do not need to incorporate anything different as I have already done so in the modified version of the old mod.

In regards to the host, I told them exactly what I tweaked the old mod to do (ie turn off pms, turn off vcard, deselect the 3 email settings, and change the thread description. Personally I'd rather do all of that vs just the 'receive admin emails'.

--------------- Added [DATE]1342113466[/DATE] at [TIME]1342113466[/TIME] ---------------

Ok simply changing the default subscription mode does not prevent emails from being sent on existing subscriptions :( If you would be so kind as to include the ability to unsubscribe from existing subscriptions that would be awesome.

Personally I don't have the blog system on, but I'm sure others do, and I can wait until you get it all sorted out since my host turned on my emails :)

kh99 07-12-2012 03:19 PM

Quote:

Originally Posted by John Lester (Post 2347323)
I want to run a couple of tests today with regards to the thread subscriptions. Mainly I want to know if setting the default to 'do not subscribe' will prevent existing subscriptions from sending emails. If it does not, then I'd test to see if setting the default to 'control panel' stops sending emails for existing subscriptions. That way we don't have to delete existing subscriptions :) I'll actually be doing that after this post :D

Let me know what you find out - but like I said, I'm pretty sure neither the "admin email" nor the "default subscription" settings affect existing subscription emails. But what you can do is set all existing subscriptions to "no notification" (or whatever it's called) using a few queries, that way if someone changes their mind they won't have lost their list of subscriptions.

John Lester 07-12-2012 03:40 PM

I guess you read my first reply but missed the second before logging off :) Changing the option does not affect existing subscriptions. I absolutely love the idea of setting the existing subscriptions to "do not subscribe" instead of unsubscribing them. That is awesome!

So are you done yet? ;p ;p

--------------- Added [DATE]1342115148[/DATE] at [TIME]1342115148[/TIME] ---------------

I have finished placing the unsubscribe link in all of the email body text phrases. I haven't tested EVERY possible scenario but I feel confident enough that adding a couple of lines in each phrase will cover any outgoing email with the exception of the admin sending mass emails. I'll look into that a little later today.

For those interested this is what I added to all of my "email body text" phrases.

Quote:

Click the link to unsubscribe from further emails from $vboptions[bbtitle]:

$vboptions[bburl]/misc.php?do=unsubscribe

If you can not click on the link copy and paste the following url into your browsers address bar; www.yoururlhere.whatever/misc.php?do=unsubscribe
There are some phrases that already contain $vboptions[bbtitle] so make sure you delete them or you will have duplicate bbtitles in one email ;)

kh99 07-12-2012 03:46 PM

Quote:

Originally Posted by John Lester (Post 2347339)
I guess you read my first reply but missed the second before logging off :) Changing the option does not affect existing subscriptions. I absolutely love the idea of setting the existing subscriptions to "do not subscribe" instead of unsubscribing them. That is awesome!

So are you done yet? ;p ;p

Yeah, I did see your reply after I posted. I'll work out how to reset the subscriptions.

I'm not done - I have to confess I haven't made any progress on it today, and I have to go out for a while this afternoon. Maybe tonight.

Edit: ...and if you have any other changes you want me to look at and possibly include, go ahead and post them.

John Lester 07-12-2012 05:40 PM

With the reset of the subscriptions I can't think of anything else that would be needed.

Simon Lloyd 07-12-2012 06:31 PM

Quote:

Originally Posted by John Lester (Post 2347374)
With the reset of the subscriptions I can't think of anything else that would be needed.

Don't know what you think of this but maybe a way to re-subscribe or request a mail back with the subscribe options in it. I only say this because you know how people are, if they've turned it off as sure as eggs are eggs they'll want to turn it back on at some point!, if we could make that process automated then they won't bother admins or staff and create more work for their pay! (what, you don't pay your staff? :D )

John Lester 07-12-2012 07:06 PM

So you want a "re-subscribe" option? How would that work if they delete the unsubscribe email? Perhaps have this plugin send the user a pm explaining what options were changed in case they would like to change them back in the future. If I could pay my staff I surely would :D

Simon Lloyd 07-12-2012 07:18 PM

Quote:

Originally Posted by John Lester (Post 2347398)
If I could pay my staff I surely would :D

Me too!, i suppose the pm is fine as long as notifications we're turning off are ones that we can turn back on easily, if for instance you blocked birthday emails that would be done with a database query...etc so not something we can easily turn back on this is why i suggested a way of requesting a "Subscribe Options" email, if we're just blanket turning off admin mails then thats easy enough to direct them on how to turn those back on.

Like i've said before, just thinking or brain farting out loud :)

John Lester 07-12-2012 11:10 PM

Actually the blocking of birthday emails is done by deselecting the "receive emails from admin" option. But yes the pm would contain a list of options that were changed and how to change them back to however you want them :)

--------------- Added [DATE]1342196403[/DATE] at [TIME]1342196403[/TIME] ---------------

Quote:

Originally Posted by kh99 (Post 2347344)
Edit: ...and if you have any other changes you want me to look at and possibly include, go ahead and post them.

It just dawned on me, I don't know for sure which settings you have already included into this mod.

What I think it should include (to be the most comprehensive unsubscribe mod to date) is: turn off email from admins, turn off email from other members, turn off friend requests, turn off emails for new pms, turn off vcard download, set subscriptions to "through control panel only", reset existing subscriptions to "through control panel only", move the user to a different user group, send the user a pm explaining what changes where made and where to change them back if they want.

Code:

$db->query("UPDATE " . TABLE_PREFIX . "user SET options= options - 256 WHERE (options & 256) AND userid=" . $vbulletin->userinfo['userid']);
$db->query("UPDATE " . TABLE_PREFIX . "user SET options= options - 2097152 WHERE (options & 2097152) AND userid=" . $vbulletin->userinfo['userid']);
$db->query("UPDATE " . TABLE_PREFIX . "user SET options= options - 32 WHERE (options & 32) AND userid=" . $vbulletin->userinfo['userid']);
$db->query("UPDATE " . TABLE_PREFIX . "user SET options= options - 4096 WHERE (options & 4096) AND userid=" . $vbulletin->userinfo['userid']);
$db->query("UPDATE " . TABLE_PREFIX . "user SET autosubscribe = 0 WHERE autosubscribe = 1 OR 2 OR 3 AND userid=" . $vbulletin->userinfo['userid']);

That bit takes care receive email from members, receive email on friendship request, new subscriptions to "through control panel only", turns off vcard, and turns of emailonpm.

John Lester 07-14-2012 04:28 PM

So at 4 am this morning I woke up with an idea on how to incorporate into this mod Simon's idea for a resubscribe link.

In the pm that is sent out stating that such and such settings have been changed to ensure you no longer receive emails from our site, a link is included to "resubscribe" the user. The link would take you to a page (not the user cp) with only the settings that were changed and explain in a little more detail what the settings do and the option to change / reselect them. Then the users clicks a radio button saying "yes I want to receive emails from websitehere that correspond with the settings I have selected". Once the radio button is checked the input box for their email address becomes available and they enter their email and click the resubscribe box.

That way a user has to "double opt in" and has no ground to claim any of the emails as spam :)

Under the resubscribe box is a note that states "In order to receive emails from websitehere you need a valid email address. To update/change your email address click here before submitting." That link would open a new window to the change email / password in the users cp (since they're already logged on to read the pms).

I think if you could incorporate that, this mod will become very popular, and perhaps if the devs really do have some smarts they'll incorporate it into the core at some point :)

Simon Lloyd 07-14-2012 04:39 PM

John, exactly my thoughts, only i was thinking of it in a one shot mail, the one they get to unsubscribe also has the options to resubscribe (negates the need for extra coding in templates..etc) but your idea can work just as well and like you say, a seperate page gives you the space to explain a little more (Kevin, don't forget to make this compatible with at least vb3.7.x onward, it's gotta be the most "Must have" mod idea to have ever come about), and hopefully they'll take this on in vb5 :)

kh99 07-14-2012 05:53 PM

The only small issue I see with the resubscribe stuff is that it's actually possible (as far as I know) for a member to be subscribed to hundreds of threads and forums and have a different type of notification for each, so if we set them all to "no email" then we won't remember what they were (unless of cource we save all that somewhere - I suppose we could make a huge string).

Simon Lloyd 07-14-2012 06:04 PM

1 Attachment(s)
And that is the issue, if you turn off forum subscriptions (the user may have only wanted to turn off the odd one or two) then it's a pain for the user to resubscribe to each, so either you do need to save all the unsubscribes in a string in the db or explain to the user that it turns all of them aff and that they'd have to visit each forum to turn on the ones they want (i've built a mod for this vb3 for easy selection all in one place, which if you want the code i'll gladly donate it), see that attached for how my mod works :)

John Lester 07-14-2012 07:33 PM

Just set them to "through control panel only" that way they keep their subscriptions but don't get the emails. They can then choose to receive emails upon thread subscription, sure they'll have to go through it thread by thread ... but it's the price they'll have to pay for unsubscribing then resubscribing.

My thoughts are, if they want to unsubscribe from all emails then it's on them to reselect the ones they want if they change their mind later on.

I think having options in the ACP to choose what the unsubscribe button does would be the best bet. Then you would have to tell them (admins) to change the phrase(s) to reflect what settings are changed when a user clicks the button.

The reason I suggest a pm vs email for the resubscribe is (at least in my case(s) ), the user will most likely delete the email and therefore have no idea what was changed. There is a better chance at them saving a pm then the email ;)

John Lester 07-19-2012 03:14 PM

Hi Kevin :)

Have you been able to work on this mod lately? Curious to know where you are at with it :)

kh99 07-19-2012 03:33 PM

I haven't made much progress but I haven't forgotten about it - I'll get to it soon. :)

Have you solved all your email problems?

John Lester 07-19-2012 06:12 PM

As far as the host knows I have ;) I'm actually just waiting for this mod as (assuming it does everything we've discussed) it's a complete solution for unsubscribing :)

John Lester 08-02-2012 05:47 PM

I remember it being brought up on the first page, were you going to incorporate and option to move the unsubscribers to a different user group? I think that should be an option so we can see how many people are unsubscribing ;)

kh99 08-02-2012 06:06 PM

Hey John - I kind of figured you had given up on this since I saw that you had posted in one of the other mods. Anyway, I asked Simon Lloyd if he wanted to take over working on this (so it might actually get done), but I think he's been too busy.

John Lester 08-02-2012 10:31 PM

Send me what you have and I'll fiddle around with it :D I only posted in that other mod to help that guy. This mod here (this thread) is the one I'm after ;)

--------------- Added [DATE]1343974087[/DATE] at [TIME]1343974087[/TIME] ---------------

Ok all I have left to do is code the move to a different user group and code the options for the ACP. I worked out how to change existing subscriptions to "through control panel only" :)

I'll wait and see what you've got before I continue as I'm quite tired tonight.

Simon Lloyd 08-03-2012 02:24 PM

Hi John, Kevin's right, i haven't had time at the moment, i've been looking at the product that Kevin uploaded here and he's pretty6 much got it down except the re-subscribe or keeping a record of what the user unsubscribed from, or allowing a page where all the things they unsubscribed from are present to resubscribe, i cant say when i'll have time at the moment as i have many things going on on along with 7 day working at the moment.

John Lester 08-03-2012 08:16 PM

That's alright I've been working on it myself :) However I'm a bit stumped. Trying to add the option (I add them one at a time to make trouble shooting my screw ups easier :D ) to change new thread subscriptions to "through control panel only" and when I import the XML I get the following error;

XML Error: XML_ERR_NAME_REQUIRED at Line 153

Line 153
Code:

<phrase name="setting_adv_unsublink_new_thread_sub" date="1312347600" username="Mike_W" version="1.0"><![CDATA[Set new thread subscriptions to through control panel only.]]></phrase>
Every solution I have seen says it's the & not being parsed (which I have none), so that's where I'm stumped, it looks fine to me.

The setting looks like (followed Kevin's format obviously)
Code:

            <setting varname="adv_unsublink_new_thread_sub" displayorder="40">
                <datatype>free</datatype>
                <optioncode>yesno</optioncode>
                <defaultvalue>0</defaultvalue>
            </setting>


kh99 08-03-2012 08:40 PM

Quote:

Originally Posted by John Lester (Post 2353849)
Send me what you have and I'll fiddle around with it :D

The last one posted here is pretty much all I have.


Quote:

...and when I import the XML I get the following error;

XML Error: XML_ERR_NAME_REQUIRED at Line 153

Line 153
Code:

<phrase name="setting_adv_unsublink_new_thread_sub" date="1312347600" username="Mike_W" version="1.0"><![CDATA[Set new thread subscriptions to through control panel only.]]></phrase>


What does the line before that look like?

John Lester 08-03-2012 10:53 PM

Line 152
Code:

            <phrase name="setting_adv_unsublink_verify_title" date="1312347600" username="Mike_W" version="1.0"><![CDATA[Verify Email (Double Opt-Out)]]></phrase>

kh99 08-03-2012 11:12 PM

Hmm...that doesn't help. Look at the surrounding line for missing quote or unusual characters.

John Lester 08-04-2012 01:10 AM

It was a missing ! in the following line :p

John Lester 08-04-2012 08:51 AM

I'm about to head to bed after staring at this damn mod for 2 hours trying to find my error.

It imports just fine and the settings work, but when I go to /mics.php?do=unsubscribe all I get is the smiley page. No errors.

So I'm going to attach it here and maybe someone can find the error for me :D

It's not complete yet, still have to do the user group stuff, the resubscribe stuff, and find a way to store the existing thread subscriptions. The plan for the subscriptions is to create another table to copy the users subscriptions to and the query to take the data from the backup table and repopulate the original.

EDIT: It was a simple typo in the template name :D So with no errors I can now work on the user group stuff :)

John Lester 08-12-2012 09:33 AM

Ok I'm a bit stuck and a little confused (and not about the same thing :D ).

I basically followed Kevin's "select" and "update" queries to add the other options to be changed. However I'm a little confused why the "select" query selects username and userid when the "update" query doesn't use those variables.

Select query
Code:

$unsubscribe = $db->query_first("SELECT username, userid, email FROM ".TABLE_PREFIX."user WHERE email = '$esc_email' AND options &16");
Update query
Code:

$unsubscribe = $db->query("UPDATE ".TABLE_PREFIX."user SET options = options - 16 WHERE (options & 16) AND email= '" . $db->escape_string($email) . "'");
Now to the part I'm stuck on.... thread subscriptions. When I use my "select" query it triggers this if statment:
Code:

        if (empty($unsubscribe['email']))
        {
            eval(standard_error(fetch_error('advanced_unsubscribe_link_error_unsubscribed', $vbulletin->options['contactuslink'])));
        }

This is the select query
Code:

$unsubscribe = $db->query_first("SELECT * FROM ".TABLE_PREFIX."subscribethread WHERE userid = '$id' AND emailupdate = 1 OR 2 OR 3");
I have other issues with thread subscriptions, but I figure I should find out what's wrong with my select query first :D

Is it because the subscribethread table doesn't have an email column?

kh99 08-12-2012 11:45 AM

I don't remember why the query included username and userid, I suppose I thought I needed them (or might need them) for one of the other features we talked about. But it also doesn't hurt anything to have them there.

You're right, the subscription table doesn't include email, so there's no reason to check for that field being blank. Also I don't think you're checking correctly for multiple values of emailupdate. I think you want something like:

Code:

$unsubscribe = $db->query_first("SELECT * FROM ".TABLE_PREFIX."subscribethread WHERE userid = '$id' AND emailupdate IN (1, 2, 3)");

I think have "OR 2 OR 3" on the end of the query like that will cause it to return every row.

Oh, that brings up another issue - since you want to return every record of a user's subscriptions, you can't use query_first(), you need to use query_read() and then use a loop to get each record.

John Lester 08-12-2012 10:53 PM

Thanks for the tips on thread subscription :) I thought it was the '$id' that was returning every row, I'll use IN and see what happens :D

John Lester 08-19-2012 07:34 PM

Ok I have confused myself once again :D The subscribethread table has one column (subscribethreadid) that is auto increment, according to this website https://www.vbulletin.com/docs/html/...ards_sql_query I'm not supposed to include that field in an insert query.

I have tried the following queries which result in different errors.


Code:

        $db->query_write("
            INSERT INTO ".TABLE_PREFIX."unsub_subscribethread
            SELECT userid,
                  threadid,
                  emailupdate,
                  folderid,
                  canview
            FROM ".TABLE_PREFIX."subscribethread
            WHERE userid = '$id'
            AND emailupdate IN (1, 2, 3)");

error

Quote:

Database error in vBulletin 4.1.12:

Invalid SQL:

INSERT INTO unsub_subscribethread
SELECT userid,
threadid,
emailupdate,
folderid,
canview
FROM subscribethread
WHERE userid = ''
AND emailupdate IN (1, 2, 3);

MySQL Error : Column count doesn't match value count at row 1
Error Number : 1136
Request Date : Sunday, August 19th 2012 @ 08:18:50 PM
Error Date : Sunday, August 19th 2012 @ 08:18:50 PM
Script : http://localhost/vb4112/misc.php
Referrer : http://localhost/vb4112/misc.php?do=unsubscribe
IP Address : 127.0.0.1
Username : zombie
Classname : vB_Database
MySQL Version : 5.1.36-community-log
I don't understand how to use VALUES in this case (because the values can't be hard coded IE 5 for userid etc etc), everything I've tried results in syntax errors. So what would I put after VALUES?

Code:

        $db->query("
            INSERT INTO ".TABLE_PREFIX."unsub_subscribethread
            VALUES What goes here?
            SELECT (userid, threadid, emailupdate, folderid, canview)
            FROM ".TABLE_PREFIX."subscribethread
            WHERE userid = '$id'
            AND emailupdate IN (1, 2, 3)");

So I went with the SELECT * to insert everything from subscribethreads.

Code:

        $db->query_write("
            INSERT INTO ".TABLE_PREFIX."unsub_subscribethread
            SELECT *
            FROM ".TABLE_PREFIX."subscribethread
            WHERE userid = '$id'
            AND emailupdate IN (1, 2, 3)");

error

None but it doesn't populate unsub_subscribethread, is it because of the auto increment column in subscribethread?

According to this website http://www.w3schools.com/sql/sql_select_into.asp I should be using SELECT INTO to copy subscribethread to unsub_subscribethread (vs INSERT INTO) at least that's how I understand it so I tried;

Code:

        $db->query_write("
            SELECT userid,
                  threadid,
                  emailupdate,
                  folderid,
                  canview
            INTO ".TABLE_PREFIX."unsub_subscribethread
            FROM ".TABLE_PREFIX."subscribethread
            WHERE userid = '$id'
            AND emailupdate IN (1, 2, 3)");

error

Quote:

Database error in vBulletin 4.1.12:

Invalid SQL:

SELECT userid,
threadid,
emailupdate,
folderid,
canview
INTO unsub_subscribethread
FROM subscribethread
WHERE userid = ''
AND emailupdate IN (1, 2, 3);

MySQL Error : Undeclared variable: unsub_subscribethread
Error Number : 1327
Request Date : Sunday, August 19th 2012 @ 08:28:26 PM
Error Date : Sunday, August 19th 2012 @ 08:28:26 PM
Script : http://localhost/vb4112/misc.php
Referrer : http://localhost/vb4112/misc.php?do=unsubscribe
IP Address : 127.0.0.1
Username : zombie
Classname : vB_Database
MySQL Version : 5.1.36-community-log
Now I can only guess that this is caused by me creating the table unsub_subscreibethread in the "<installcode>" at the start of the plugin (code is below for reference). If I understand what SELECT INTO is supposed to do, it's creating the table "unsub_subscribethread" on the fly? So this wouldn't work because it would try to create the table each time the script is run?

Code:

$db->query_write("CREATE TABLE IF NOT EXISTS ".TABLE_PREFIX."unsub_subscribethread LIKE ".TABLE_PREFIX."subscribethread");

kh99 08-19-2012 07:57 PM

I haven't tried these, but I think there's two things you can do: when a column is auto increment, you don't want to supply a value but you can put NULL as a placeholder. You can put NULL where you'd put a column name in a select, and that value will always be null. So I think this would work:

Code:

        $db->query_write("
            INSERT INTO ".TABLE_PREFIX."unsub_subscribethread
            SELECT NULL,
                  userid,
                  threadid,
                  emailupdate,
                  folderid,
                  canview
            FROM ".TABLE_PREFIX."subscribethread
            WHERE userid = '$id'
            AND emailupdate IN (1, 2, 3)");


The other way would be to list each column and leave out the id column, like:

Code:

        $db->query_write("
            INSERT INTO ".TABLE_PREFIX."unsub_subscribethread
                (userid, threadid, emailupdate, folderid, canview)
            SELECT userid,
                  threadid,
                  emailupdate,
                  folderid,
                  canview
            FROM ".TABLE_PREFIX."subscribethread
            WHERE userid = '$id'
            AND emailupdate IN (1, 2, 3)");


BTW, for future reference you can see some of this in the mysql manual, for instance here's the page for the INSERT statement: http://dev.mysql.com/doc/refman/5.0/en/insert.html

John Lester 08-21-2012 02:28 AM

Well so far nothing has worked as far as populating unsub_subscribethread. However plugging each query into phpmyadmin (removing the table prefix and defining a user) works.

So it's either not pulling the userid properly, or my loop is screwed up (which certainly wouldn't surprise me). I'll have to do some more reading and hopefully find an good loop example instead of the crap that's in the tutorials.

John Lester 08-27-2012 06:44 PM

A week ago or so I screwed up and deleted my "good" file for the mod and instead saved the "working" copy. Well when I navigate to the page on my local test site for testing I get the following error;

Quote:

Parse error: parse error, expecting `']'' in C:\wamp\www\vb4112\misc.php(89) : eval()'d code on line 85

What on earth is it looking for? I have not found any open brackets anywhere :(

While I am on this subject ... why are there two ' after the ] ? For that matter why is there a ` before it?

misc.php code from line 80 to 89

Code:

// ######################### REQUIRE BACK-END ############################
require_once('./global.php');

// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################

($hook = vBulletinHook::fetch_hook('misc_start')) ? eval($hook) : false;

// ############################### start buddylist ###############################



All times are GMT. The time now is 11:54 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.03739 seconds
  • Memory Usage 1,914KB
  • 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
  • (18)bbcode_code_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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