TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,004
  • Total Topics: 21,330
  • Online today: 219
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 88
  • Total: 88

phpbox code question

Started by IchBin, March 15, 2005, 02:09:34 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Bjørn

Try to set the full path instead.

Pierse

I did this... and all the above errors are gone... now I get this error:

QuoteFatal error: Cannot instantiate non-existent class: cpm in /home/pierson/public_html/smf/Sources/Load.php(1042) : eval()'d code(31) : eval()'d code on line 2

Bjørn

That is something with the included file...the class cannot be started. Have you checked the class actually exist in the coppermine.php file? That it is not included there too?

guido

hi
I want to insert a small code php, the function forumkings() of the mod Forumkings, in a html box, but I am simply not able to do it. It appears in the box as forumkings() and not executed. I placed the keys of php, I removed them, placed html, but nothing happened; it does'nt interpret the php of the include. Is there a way to make it hapen??


saludos

guido

Kindred

place php functions in the php box, noth the html box...

guido

Quote from: Kindred on March 31, 2005, 07:41:07 PM
place php functions in the php box, noth the html box...

phpbox?,  that phpbox?.
  I believe that he must be of beta5, and I only have beta4 :(

Bjørn

Quite right, "phpbox" is only in beta5  I am afraid.

JustClem

Quote from: Bloc on March 15, 2005, 07:28:30 AMIF you want to try it in a block, remove the ?php and ?> from it, put all the html stuff inside a echo and remove the <html> and <head>/<body> tags. Then test it in the preview box. It may work...when the server is OK of course. ;)

I am confused (big surprise, eh?)

In trying to add a TeamSpeak block to the portal, I found out that my TS host blocks the query port, so I have to use a service they provide in order to get server status.  Essentially, I can use the PHP code below and it works, but it is larger than I would like.


$server_id="b14231b2dd3e7b50b6fa6e7af8fd11af";
@readfile("http://osg.cc/voicestatus/remote.php?server=$server_id");


The example HTML code uses a CSS style that can be edited to make the text smaller; however, I can't get that to work because HTML does not seem to work in a phpBox and PHP doesn't seem to work inside an HTML box.  Is that correct, or am I doing something wrong?  Is there a way to have PHP embedded inside HTML in a block?

Bjørn

If its html in that example, just enclose it in a echo staement, i assume it will look like this:

echo 'htmlfromyourexamplehere';

$server_id="b14231b2dd3e7b50b6fa6e7af8fd11af";
@readfile("http://osg.cc/voicestatus/remote.php?server=$server_id");

echo 'anyendhtmlcodehere';

So yes, html does work in phpbox, you just need to enclose it in a echo statement.

JustClem

#19
Bloc, thanks.  Will try it now 

Edit:  Worked like a charm!  Thanks, Bloc 8)

This website is proudly hosted on Crocweb Cloud Website Hosting.