![]() |
trying to make php code work for profile
How would i make it so that the settings in this code
PHP Code:
work for the text in profile fields? |
PHP Code:
this code is the one that does pretty much everythign PHP Code:
|
Essentially, the following is what is the most secure:
PHP Code:
Satan |
a code hellsatan has come up with
PHP Code:
here's some php i found in member.php PHP Code:
|
this
PHP Code:
PHP Code:
|
thank you for your input, however, read the thread.... wer'e trying to use the code we put together and/or limits for html in webpage, to work for $post[fieldx]
|
Quote:
basically describe what you mean by parsed. and having read the thread back, what i originally posted more than stands but alas that's just me. you select the field then you echo it out, it's that simple. |
hellsatan told me to put
PHP Code:
however, if theres a way that you know of to allow htlm and/or limit html the same way the webpage does, itll be helpful there are several codes that have been posted that can be used for this |
what happened when you input html into the database via the usercp does it appear in the database as you submitted it via your usercp?
|
<b> will appear as <b> and every code will jsut appear as is but it wont work
|
Quote:
|
and where would i do this? what edit would i have to make?
|
without knowing how you plan to implement this i wouldn't be able to tell you?
|
i want it to be implemented the same way $webpage[text] is implemented on this post https://vborg.vbsupport.ru/showpost....68&postcount=2 (the second code)
|
you're not getting me, i mean is this going on it's own page or member.php? why does it need to be with the additional fields on member.php if it's there etc.
|
i want it on member.php i want it to wor for the fields in member.php, for the $post[fieldx] 's that appear in member.php
|
i say add the extra query and go from there.
|
this is what i dont know how to do?
if you were to tell me what code to add or edit i would have no problems doin this... however, i myself cannot come up with a code... |
insert the query i gave you as profilefields2 and your code above
PHP Code:
|
i think i kind of get what your saying but all together... the code i should add above that would look like WHAT?
|
PHP Code:
|
i dont see $profilefields2[fieldx] in that code
I think the code would be something like this: PHP Code:
However.... i know i have to edit alot where it sais $webpage['text'] but how would i edit it so that it works as $profilefields2['fieldx'] where x is the profilefieldid |
i'm assuming webpage[text] is the field you're reffering to from the useroptions right?
then that being the case you could just select that field with a query assign it to webpage text and voila you have what you need. but in these peoblems it's hard to help as it's less about pointing out the error in the code, it's more about building the code and with limted info that's very hard ps replace you're iff's with trinary operators and also you'll find data from the DB selects alot faster when columns are specified as opposed to wild cards. |
I'm sorry but i am not a php coder, i am still in the learning process when it comes to php. If i have not been sepcific as to what it is i want to do let me say it once more :):
The $webpage[text] has limits as to what html is allowed.... i would like the same for $post[fieldx] (where x is the ID of the profile field). I would just like for $post[fieldx] to follow the same html rules as $webpage[text] Thanks once again, Gio |
what is the query $webpage?
|
[high]*gio~logist takes a ballpark*[/high]
PHP Code:
|
nope, it will be above that and it should say something like $webtext = $DB_site->query("
etc |
this is what i've seen so far that looks anything like what you posted
PHP Code:
|
find the $row variable's creation.
|
THIS?
PHP Code:
|
nope
|
PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
it's the top one, am i to assume you're not using vB?
|
actually i am, that was in member.php...... im not sure if the code needs to be changed here or in profile.php (perhaps profile fields are filtered while they are submitted), but thats where u come in i guess...
|
i have no idea what a profile field has to do with any of the $webpage/$row query?
regarding that stuff, that's in no member.php i've ever seen i suggest you vBulletinize it. regarding the profile fields if you add the query to the page then whatever sanitizing is happening is evaded. |
$webpage/$row query has nothign to do with profile fields
$webpage/$row query = a hack that i have installed (webpage and guestbook) the webpage and guestbook hack follows its own html rules in which you can edit via admincp i am trying to make it so that THE PROFILE FIELDS FOLLOW THE SAME RULES or so that PROFILE FIELDS ARE ALLOWED TO USE HTML ACCEPT FOR MALICIOUS CODES SUCH AS <SCRIPT> |
then why not just due the $webpage[text] rows and replace $webpage[text] with $whatever[fieldx]?
|
$whatever[fieldx] that means id have to do this code in member.php for as many fields as i want to allow html for or will [fieldx] be abole to be used for any field?
AND HOW WOULD I DO THIS? [HIGH]TRIED SOMETHING DIFF[/HIGH] Ok so far i have tried the following in order to allow and limit html I have tried editing functions_user.php and doing the following edit In ./functions_user.php FIND PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
All times are GMT. The time now is 03:42 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|