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,019
  • Total Topics: 21,332
  • Online today: 1,062
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 354
  • Total: 354

call smf-functions in blocks?

Started by pcw, September 12, 2005, 10:30:07 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pcw

i want to create a php-block with some smf-functions like db_query() etc.

but everytime i call a function like db_query() or allowedTo() all i get is like
QuoteWarning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/host/dir/dir/htdocs/smf/TPpreview.php(18) : eval()'d code on line 1

Parse error: parse error, unexpected $ in /home/host/dir/dir/htdocs/smf/TPpreview.php(18) : eval()'d code on line 1

is there a way to use these functions inside php-blocks?

bloc

yes..but not in the preview window.

Could you post the code/line with the call?

pcw

i get this error even when the block just contains a global $db_prefix;
db_query("SELECT ID_MEMBER FROM {$db_prefix}members",__FILE__,__LINE__);


something like loadLanguage('Calendar'); causes exactly the same error.

This website is proudly hosted on Crocweb Cloud Website Hosting.