Facebook  Twitter 

SMFHacks.com

+- +-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 11873
Latest: Herry Lewis
New This Month: 10
New This Week: 0
New Today: 0
Stats
Total Posts: 37597
Total Topics: 6619
Most Online Today: 87
Most Online Ever: 2482
(April 09, 2011, 06:02:45 pm)
Users Online
Members: 0
Guests: 53
Total: 53

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

0 Members and 1 Guest are viewing this topic.

Offline shuban

  • Hero Member
  • *****
  • Posts: 529
    • View Profile
    • Biology Forums - For All Your Science Needs
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: 13913
    • 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 http://www.forumrankings.net - find out how your forum compares with others! Also contests/promotions for verified sites.

Offline shuban

  • Hero Member
  • *****
  • Posts: 529
    • View Profile
    • Biology Forums - For All Your Science Needs
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: 13913
    • 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 http://www.forumrankings.net - find out how your forum compares with others! Also contests/promotions for verified sites.

Offline shuban

  • Hero Member
  • *****
  • Posts: 529
    • View Profile
    • Biology Forums - For All Your Science Needs
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
3374 Views
Last post June 04, 2007, 06:46:08 pm
by SMFHacks
2 Replies
2806 Views
Last post April 28, 2009, 05:21:29 pm
by SMFHacks
2 Replies
2993 Views
Last post September 03, 2009, 05:07:10 pm
by Bar Nuthin
4 Replies
3284 Views
Last post July 09, 2011, 04:59:00 pm
by Xtreme4U2NV
9 Replies
3233 Views
Last post March 12, 2013, 01:46:59 pm
by Wegg

+- Recent Topics

Size of Image inserted into Forum Topic by scalesusa
February 18, 2017, 07:28:38 pm

Is it possible to not send email notification on sendpm function? by SMFHacks
February 16, 2017, 12:46:02 pm

Create One New Forum Topic with Batch Upload by SMFHacks
February 15, 2017, 09:46:26 pm

Looking for a mod that helps use include image in the post by DenDen60
February 13, 2017, 02:04:07 pm

Issue with resizing of images by SMFHacks
February 12, 2017, 07:30:16 am

Unable to upload MP4 video by landyvlad
February 12, 2017, 07:25:05 am

need help with Trader System 1.7 by snowball
February 11, 2017, 10:18:41 am

In a source file, how do I prompt guests that they are not allowed to enter by shuban
February 10, 2017, 01:35:29 pm

Do not run a query Mysql by GeorG
February 10, 2017, 08:56:57 am

Banned!!! by GeorG
February 10, 2017, 07:55:05 am

Powered by EzPortal