The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
for,foreach or while?
ok to understand this script, you need to know that $grps_showgroup is predefined at an earlier part of the script
the form that sends the data to the scipt is HTML Code:
<form action="invitation.php" method="post"> <table> <tr> <td valign="top"> <fieldset> <legend>Users To Invite</legend> Username: <input name="invite_username[]" type="text" size="25" maxlength="250"><br /> <br /> Username: <input name="invite_username[]" type="text" size="25" maxlength="250"><br /> <br /> Username: <input name="invite_username[]" type="text" size="25" maxlength="250"><br /> <br /> Username: <input name="invite_username[]" type="text" size="25" maxlength="250"><br /> <br /> Username: <input name="invite_username[]" type="text" size="25" maxlength="250"><br /> </fieldset> </td> <td valign="top"> <fieldset> <legend>Personal Message To Be Included</legend> <textarea name="personal_message" cols="50" rows="9" id="personal_message">Please Enter A Personal Message The Group Description and Group Title Will Be Automatically Included.</textarea> </fieldset> </td> </tr> </table> <br /> <input name="submit" type="button" value="Send Invite(s)"> <input type="hidden" name="do" value="doinvite" /> </form> PHP Code:
|
#2
|
||||
|
||||
First thing I would like to say is that you have to seperate your form names.
Else, since all form names are the same, you get one username. Second, having the PHP Code:
Third, if you pass invite_username as a STR, you will break it as it is an array of usernames. you must pass it without a datatype. |
#3
|
||||
|
||||
heh, sorry i totally missed that whole post and got it sorted but i was put onto some super code
PHP Code:
i've figured the best thing would be to let it go through, split the array at an empty point then remerge it? that way i'm not making the database so any extra work as even if they put in two usernames, had a blank field then another two usernames it would just remove the space and then do the queries for the other four? |
#4
|
||||
|
||||
PHP Code:
|
#5
|
||||
|
||||
this is the below code, is it compatible?
PHP Code:
|
#6
|
||||
|
||||
My first comment would be that you NEED to use an if() for the pmpopup. It was what annoyed me the most about rpg v2
and I believe you can just use my foreach before the $recipants (:P) query. The purpose of my code was to eliminate empty array keys before the query, I think |
#7
|
||||
|
||||
done that, but now it's failing at
PHP Code:
|
#8
|
||||
|
||||
If I was you, I would just steal vB's PM Send code
It takes care of all that bs and produces perfectly coded PMs And ti fails at that point because you need to rename the count()'d array |
#9
|
||||
|
||||
Thanks Revan, working perfectly
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|