Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Form Messing Up Code
Avatar
rebeccagill
Detroit, Michigan
Member
Offline
Jun 28, 2013 - 2:40 pm

We're using SimplePress to provide support for our theme store where we post code snippets, especially PHP & CSS, for our customers. But the forum keeps stripping out lots of chunks of our code. In particular we're having problems with it stripping out things like class="someclass" from PHP and HTML.

We're running SimplePress v.5.2.6, the Editor TinyMCE Rich Text v.2.0.6 plugin and the Syntax Highlighting v.1.3.1 plugin.

We can't have the forum altering the code snippets we're posting when a typo can crash our customer's sites. Is there any way this can be fixed?

Avatar
Yellow Swordfish
Glinton, England
SP Master
Offline
Jun 28, 2013 - 2:47 pm

Can I suggest you try a sample of the sort of code you are having problems with on this site in this thread? We have no known issues and post code snippets here quite regularly so it might be useful to see what happens and just what is being pasted. After you save it take a look at the result and then write a follow up post pointing out any issues please...

And we are running the syntax highlighter here...

andy-signature.png
YELLOW
SWORDFISH
Avatar
rebeccagill
Detroit, Michigan
Member
Offline
Jun 28, 2013 - 8:26 pm

Here's an example of something that gets garbled:

// Modify Post Info
add_filter('genesis_post_info', 'my_post_info_filter');
function my_post_info_filter($post_info) {
if (!is_page()) {
 $post_info = '[post_date format="m.j.Y"] [post_author before="Posted by "] [post_comments] ';
 //$post_info = 'Custom text'; //edit this to whatever you'd like.
}
return $post_info;
}

On our forum it is stripping out all of the short codes in the $post_info declaration. 

But as I paste it here I see that it keeps the code in tact.

So that begs the question, what is messing with the way the forum handles code on our site?

Do you know of any plugin conflicts? We have a fair amount going on with our site, WooCommerce and more.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
Offline
Jun 28, 2013 - 8:57 pm

sorry, not at site and replying by email, so cant see whole topic...

are you pasting this as code using the syntax highlighter? not putting it in code tags, but actually using the syntax highlighter... if so, it stripping out the shortcodes? or is it executing the shortcodes?

might mean our shortcode processing is active in code segments when it shouldnt be...

have you entered the shortcodes on forum - options - content settings to be allowed?

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625