need to allow 2 php functions in posts!! PLEASE HELP

Started by Dean Williams, October 24, 2005, 11:52:30 AM

Previous topic - Next topic

Dean Williams

hello, Im after someone who know how to add new bb code to my forums, Im using 1.0.5.

I need to allow a poster (if you can make this admin only thats great but no probs if you cant) to set some PHP vars in some way. Then I need to be able to run a php file iusing the php include() function.

This post has been edited from before I wanted full PHP, but i dont need full php just those functions!

Anyone who can help i will be very happy :)

bloc

This is like handing someone a matchstick near a pool of gasoline.. :P

If you need to let users show "live" php code in a post, i suggest using something other than a forum really. Your site will be wide open if you let someone do that.

Oldiesmann

I don't care how much you trust these people, allowing PHP in posts is way too dangerous. What exactly does your team need to do that would require allowing the posting and execution of PHP?
Michael Eshom
Christian Metal Fans

Dean Williams

well we are selling things, and a good way to list an item quickly is by using php.. ie all required information goes to variables

$title="item title"
..more vars..

then i will be setting up a function in index.php which will create the contents using the vars.

So really in the post i need to allow myself and others to setup PHP vars. I then need to know where to put my PHP code to setup the function that will be executed in my post.

BTW I dont care that you think this is risky, it wont hurt you lot atall just me and my server! So please give me the ****** code!

gerrymore

I suggest not using a forum then. Get yourself some auction or e-commerce software instead. There are plenty of good ones around (some good ones free, at that).
SMF RC1, Tiny Portal 0.75, Coppermine 1.3.3, Flashchat.

Dean Williams

no sorry im doing it on the forum as i also do other things with my site... So again ill ask nicely...

Please can i have a script to allow full or partial php.... PLEASE! and stop with the security warnings etc. its my responsibility!

Jack.R.Abbit™

First off, this is a bit uncalled for.
Quote from: tpvgames on October 24, 2005, 01:18:26 PMSo please give me the ****** code!
I understand you *NEED* this like yesterday (as everyone always does ::)) but that is a bit rude and not a way to motivate people to help you.

Now, if I understand you correctly, you really don't need "PHP" in the post.  You need a way for them to do like this in their post:

[post_vars]
_title=This is the title
_text=This is the text
[/post_vars]


and you turn it into something like this in the actual display:
This is the title
This is the text

(or what ever you want the output to look like)

Is that what you want to do?  I don't know how to do it, but getting away from the "I need PHP in my post" idea might be easier to swallow for the security minded folk around here.

Dean Williams

well i know it was uncalled for but in my first post i mentioned i knew of the risks!

Now about this, maybe full php isnt required, but yes i will need to setup vars...

Then maybe include a file in php to be executed in the page: include(/file/);... that is all i need!

But the code within the included file must be able to execute!

And im sorry about before, im a bit angy that your all saying its risky when i already know :p


Advertisement: