The following warnings occurred:
Warning [2] Undefined array key "threadviews_countguests" - Line: 745 - File: showthread.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php 745 errorHandler->error_callback
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/inc/functions_post.php 830 postParser->parse_message
/showthread.php 916 build_postbit
Warning [2] Undefined property: MyLanguage::$thread_modes - Line: 46 - File: showthread.php(1650) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php(1650) : eval()'d code 46 errorHandler->error_callback
/showthread.php 1650 eval




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
image path in GS 3.x.x
#4
(2014-04-27, 05:01:37)Timbow Wrote: I don't fully understand why, but you can't use php tags in the page content. You can use your get_site_url() php for links in the template and in a component like the sidebar but not in the main page content.

Most CMSes only allow html in page/post contents. Some also use some kind of shortcode system.

Allowing/using php in content can be dangerous. You can easily break your site if you just miss a comma or a parenthesis or anything, and is also a security hole if there are non-admin editor users (if you use some plugin that restricts user privileges)

Just like with e.g. Wordpress (which is similar to GS in several aspects), best solution is using one of the several plugins that allow inserting shortcodes/placeholders for php functions. (e.g. DynPages or ShortCodes in GS)

Anyway if you want PHP you can use the Exec-PHP plugin.
Reply


Messages In This Thread
image path in GS 3.x.x - by phpman - 2014-04-27, 01:01:14
RE: image path in GS 3.x.x - by Timbow - 2014-04-27, 05:01:37
RE: image path in GS 3.x.x - by Carlos - 2014-04-27, 18:11:09
RE: image path in GS 3.x.x - by shawn_a - 2014-04-27, 11:01:46
RE: image path in GS 3.x.x - by phpman - 2014-04-27, 21:36:49
RE: image path in GS 3.x.x - by phpman - 2014-04-27, 23:39:38
RE: image path in GS 3.x.x - by shawn_a - 2014-04-28, 00:09:43
RE: image path in GS 3.x.x - by phpman - 2014-04-28, 05:40:17
RE: image path in GS 3.x.x - by phpman - 2014-04-28, 23:04:25
RE: image path in GS 3.x.x - by phpman - 2014-04-29, 00:45:12
RE: image path in GS 3.x.x - by phpman - 2014-04-29, 00:59:32
RE: image path in GS 3.x.x - by shawn_a - 2014-04-29, 01:03:44
RE: image path in GS 3.x.x - by phpman - 2014-04-29, 01:08:03
RE: image path in GS 3.x.x - by Carlos - 2014-04-29, 01:20:11



Users browsing this thread: 3 Guest(s)