Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4253
Latest: Ineedsmfhelp
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 43242
Total Topics: 7516
Most Online Today: 76
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 1
Guests: 77
Total: 78

Author Topic: How do I make the product description PHP ready?  (Read 3851 times)

0 Members and 1 Guest are viewing this topic.

Offline shuban

  • Hero Member
  • *****
  • Posts: 665
    • View Profile
    • Biology Forums
How do I make the product description PHP ready?
« on: January 10, 2017, 06:29:01 pm »
Instead of using bbcode, I'd like to use PHP instead, is that possible?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16428
    • View Profile
Re: How do I make the product description PHP ready?
« Reply #1 on: January 10, 2017, 06:36:42 pm »
Harder to do.
Would have to use the php eval() statement
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline shuban

  • Hero Member
  • *****
  • Posts: 665
    • View Profile
    • Biology Forums
Re: How do I make the product description PHP ready?
« Reply #2 on: January 10, 2017, 06:57:08 pm »
Could you elaborate on this?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16428
    • View Profile
Re: How do I make the product description PHP ready?
« Reply #3 on: January 10, 2017, 07:05:21 pm »
It's a lot of steps actually. Since you have to change the template from parse_bbc to eval then also remove the security checks/changes made in Store2.php for descriptions for adding/editing products.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline shuban

  • Hero Member
  • *****
  • Posts: 665
    • View Profile
    • Biology Forums
Re: How do I make the product description PHP ready?
« Reply #4 on: January 10, 2017, 07:14:39 pm »
I noticed that

Code: [Select]
'.parse_bbc(stripslashes($context['store_item']['description'])).'
Needs to be changed.

I'd like to do a test run where I manually added php code into the database of a product. But I'm not sure how to use:

Code: [Select]
ob_start();
eval("echo "Some awesome output. "");
$this_string = ob_get_contents();
ob_end_flush();

as suggested here: https://cgd.io/2008/how-to-execute-php-code-in-a-php-string/

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
4491 Views
Last post June 04, 2007, 07:46:08 pm
by SMFHacks
2 Replies
4790 Views
Last post April 28, 2009, 06:21:29 pm
by SMFHacks
2 Replies
5063 Views
Last post September 03, 2009, 06:07:10 pm
by Bar Nuthin
9 Replies
6358 Views
Last post March 12, 2013, 02:46:59 pm
by Wegg
5 Replies
3474 Views
Last post November 15, 2017, 05:29:15 pm
by SMFHacks

+- Recent Topics

is it possible to add support for odysee.com by SMFHacks
March 13, 2024, 10:53:28 pm

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Gallery icon as last added image by fvlog19
February 01, 2024, 01:04:56 pm

User Gallery Feature: move / bulk move images by SMFHacks
January 30, 2024, 05:48:25 pm

In the future it may be for smf 2.1.x? by smithloo
January 30, 2024, 12:55:34 am

Powered by EzPortal