Placing PHP code in specific locations in RW


#1

Hello guys,

I’m installing a script from PHPJabbers and this one requires some PHP code to be placed on the page in specific locations (first line and last line of code on the page). I’m trying to figure out how to do this and I’m not certain that using the code fields in RW HUD would work.

I’m assuming that I can place the first line of code by placing it in the Prefix field but what about placing the last line of code? EDIT: Actually, placing the code in the BODY field in the RW HUD places it as the last line before the tag. Brilliant!

If I View Source and then paste the code, will this code be saved with the project if I return to normal view and save? EDIT: I’ve realised that one cannot edit the source code sadly. This would be a great feature if Realmac would consider it but I guess it could be dangerous!

Any help appreciated,
Beem


(scott williams) #2

This has come up before (phpjabber code).
Nope you cannot edit source then reload it into RW.
Only option is to export the page, add the code and upload via ftp.
Put a big note to yourself at the top of the page using locker (or similar stack, you can even put the code to be pasted in there) to remind yourself later.

Not a great solution, but it works


#3

Thanks for the reply @swilliam.