Advertisement:

Author Topic: PHP at creating category / thread  (Read 376 times)

Offline nitair

  • Newbie
  • *
  • Posts: 6
PHP at creating category / thread
« on: January 22, 2018, 05:56:31 AM »
Hi all,

I would like to add a PHP script into title / description (as showed in screenshot). How I can do that?


Also if <?php echo 'Test'; ?> is possible, can I add something like that? : <?php echo '<p style="color: #000">Test</p>';  ?>
« Last Edit: January 22, 2018, 06:07:34 AM by nitair »

Offline Aleksi "Lex" Kilpinen

  • Support Specialist
  • SMF Super Hero
  • *
  • Posts: 16,324
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • aleksi-kilpinen on LinkedIn
Re: PHP at creating category / thread
« Reply #1 on: January 22, 2018, 06:05:59 AM »
Perhaps you could explain a bit further - What are you trying to achieve, where exactly, and what have you done already?
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.

"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum.
 Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Offline nitair

  • Newbie
  • *
  • Posts: 6
Re: PHP at creating category / thread
« Reply #2 on: January 22, 2018, 06:11:32 AM »
I'm trying to add a PHP-Script which checks if a port is open or closed (like an online status in title).

What I'm already done: Notice Screenshot. I'm just asking if there is possibility, but didn't edit template that much (just wanted to be sure).

Offline Illori

  • Project Manager
  • SMF Master
  • *
  • Posts: 48,580
Re: PHP at creating category / thread
« Reply #3 on: January 22, 2018, 06:12:04 AM »
php is not parsed as a board title.

Offline nitair

  • Newbie
  • *
  • Posts: 6
Re: PHP at creating category / thread
« Reply #4 on: January 22, 2018, 06:14:32 AM »
I did noticed that (thats why Im posting here...), but is there no possibility to enable this parsing?

Offline Illori

  • Project Manager
  • SMF Master
  • *
  • Posts: 48,580
Re: PHP at creating category / thread
« Reply #5 on: January 22, 2018, 06:20:55 AM »
i dont think so. it would be easier to add the code directly in one of the templates and let it be parsed that way. you could add it in index.template.php into the header and it would show up on all pages.

Offline nitair

  • Newbie
  • *
  • Posts: 6
Re: PHP at creating category / thread
« Reply #6 on: January 22, 2018, 06:24:30 AM »
Yeah that's already done, but I don't like it on this way. Okay then... thanks for your help. I'll use the index.template.php way...