The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Im struggling trying to get $username to show up
Hi,
Im still learning the ropes, so I thought I would take quite an easy hack and re-code differently. This is what the code was orginally Quote:
This is what ive got - Quote:
Quote:
Quote:
Im getting there on the other parts, however seem to have hit a stumbling block on this! Any help greatly appreciated! |
#2
|
|||
|
|||
Instead of
PHP Code:
PHP Code:
|
#3
|
|||
|
|||
Thanks bananalive, i'll give that a try now!
One more thing im strugging with is getting the users post count to increase after the thread has been created. The thread total increases by 1, however the users post count dosent seem to increase. This is the current code ive got - PHP Code:
PHP Code:
Quote:
A couple of quick questions, if someone was to use ' or " - it throws an error. Is there anyway of getting the code to ignore those characters? Also, and I know this is cheeky, but im still learning, could you just go through what the line of code means? Ive done a little bit of digging. Quote:
I just dont quite understand what all the various " ' are in that line of code. Once again, thanks for your help, its really appreciated. --------------- Added [DATE]1243438523[/DATE] at [TIME]1243438523[/TIME] --------------- Managed to solve the postcount issue - had to use an SQL query. Would have prefered to have done it via the datamanager but was having no luck. If anyone knows of how to do this via the datamanager I would be really interested for furture use. Ive still got one issue regarding " ' in the above post if someone could help. Thanks --------------- Added [DATE]1243442021[/DATE] at [TIME]1243442021[/TIME] --------------- Ive come across one more problem that I could really do with some help with please! When I used the "register_addmember_complete" hook - Once a member registers it creates a thread with the title being "Welcome to the forum John" However when I used the hook "register_activate_process" it creates the thread after the member has activated via email, however it only shows the title as "Welcome to the forum" - for some reason it dosent seem to recognise the $username in the title. Im sorry to be such a pest! |
#4
|
|||
|
|||
Try
PHP Code:
The rest is like a normal php line, eg. PHP Code:
You could add this line at top of plugin PHP Code:
|
#5
|
|||
|
|||
Quote:
Quote:
Regarding the ' and " - I can see where your coming from, still need to get my head around them. Ive got a nice big php/sql book sitting here waiting for me to read it! |
#6
|
||||
|
||||
You should still sanitise it before displaying. (Not 100% sure if it is already sanitised when fetched.)
PHP Code:
|
#7
|
|||
|
|||
Quote:
When you say "sanitise" it, what does that actually mean? |
#8
|
|||
|
|||
Quote:
What does this mean? Well, for one, you’re going to inspect the data and make sure that it doesn’t contain any malicious code such as ill-intentioned javascript. Another is to prepare the data so that when it gets added to your insert/update SQL it doesn’t break the SQL (or do other nasty actions). Otherwise know as a SQL injection attack. |
#9
|
|||
|
|||
Quote:
|
#10
|
|||
|
|||
Thats OK Buddy, oh i forgot this for you
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|