The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Parse $pagetext for members...
Posted this in another forum but I think it might have been wrong one...
Type Names in a textbox, using print_textarea_row($vbphrase['text'], 'pagetext', $raid['pagetext'], 10, 50, 1, 0); When you click add attendees, it will parse thru each one and add new record in raid_attendees table. Example: (Enter this into pagetext) Blah Bleh Blah2 Bleh2 Blah3 Bleh3 When you hit submit, it will parse thru each with a linebreak and... add new record in a table for blah add new record in a table for bleh add new record in a table for blah2 add new record in a table for bleh2 add new record in a table for blah3 add new record in a table for bleh3 I know its some kind of an array, but cant figure out how to loop it and use each name. No one? I am doing this in an edited announcement.php file inside modcp if that helps. |
#2
|
||||
|
||||
Try and explain yourself a bit better, screenshot may help
|
#3
|
|||
|
|||
print_textarea_row($vbphrase['text'], 'pagetext', $raid['pagetext'], 10, 50, 1, 0);
(Included into screenshot with names in box) When I hit submit, it will parse thru each line break and ... Add Benumbed into table "raid_attendees" Add Renwo into table "raid_attendees" Add Fila into table "raid_attendees" Add Valura into table "raid_attendees" Add Agronom into table "raid_attendees" Add Ewoc into table "raid_attendees" Add Eman into table "raid_attendees" Basically just does a for each (line break) enter name into database. I know it sounds retarded why I want to do it this way, but I play a game where it takes a copy of raid attendees (which can be 40-50+) and I just paste in a textfile so I can update there attendance (they get rewards, etc). |
#4
|
||||
|
||||
PHP Code:
|
#5
|
|||
|
|||
PHP Code:
also (sorry, I really am) How would you parse this: Code:
1 Borr 60 Paladin 1 Fila 60 Warrior 1 Mightyal 59 Warrior 1 Soulss 60 Priest 1 Taparoo 60 Warlock 2 Crazy 60 Paladin Officer 2 Cronis 60 Mage 2 Ewoc 60 Warrior 2 Shortee 60 Rogue 2 Xirro 60 Druid 3 Agronom 60 Paladin 3 Benumbed 60 Priest Raid Leader 3 Souldat 60 Rogue 3 Warv 60 Paladin |
#6
|
||||
|
||||
Quote:
|
#7
|
|||
|
|||
PHP Code:
Name Name2 Name3 Code:
1 Borr 60 Paladin 1 Fila 60 Warrior 1 Mightyal 59 Warrior 1 Soulss 60 Priest 1 Taparoo 60 Warlock 2 Crazy 60 Paladin Officer 2 Cronis 60 Mage 2 Ewoc 60 Warrior 2 Shortee 60 Rogue 2 Xirro 60 Druid 3 Agronom 60 Paladin 3 Benumbed 60 Priest Raid Leader 3 Souldat 60 Rogue 3 Warv 60 Paladin Name Name2 Name3 format. What I am asking is there a preg_strip to strip all from but names, then enter it in database. Sorry for not giving good details, its kinda hard for me to explain what it all this does =\ |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|