News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

My quick reply keeps breaking (showing hidden fields on the page)

Started by Jade Elizabeth, December 08, 2015, 08:14:20 PM

Previous topic - Next topic

Jade Elizabeth

So I installed the theme Redsy and then the mod SMF Post prefix onto it. I have asked and no one seems to know what's happening. Essentially the hidden fields break in the quick reply box. This doesn't happen on the default theme. It causes new replies to have the title "Re: <span class=" when quick reply is used. Normal reply goes through fine.

I've checked the templates, tried disabling JS...the source looks completely fine and unbroken and the error logs are empty. If you'd like to see for yourself you can see here: http://www.colormeforum.com/ (you will have to sign up and put QR on, please let me know if you want your account deleted later).

In the screenshot the word "paid" is the prefix and the word "test" is the topic name, and it always results in "Re: <span class=" when posted.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Gluz

That mod fail to install on Redsy, but it's because the exact part the mod is looking for is not there, don't even exist for Redsy theme, if you modify the Display.template.php of Redsy where the $context['subject'] is located, is wrong, as in the default theme's Display.template.php that is the second instance of $context['subject'], the first and what the mod is looking for is almost all the way up (compare the section "// Show the topic information - icon, subject, etc." in default and Redsy themes)

Also, the Redsy Theme doesn't show what is in $context['linktree']['extra_before'] as the default theme (you can check in the theme_linktree() function in teh index.template.php of default and Redsy themes).


Jade Elizabeth

Are you saying there's two instances in the default template and I changed the wrong one in redsy? Cause I did manually put the prefix_subject part in.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Gluz

Yup, I checked all of that I said as I edited the files, if you edited the Redsy instance that's the one that cause the failure.

Also, the thing that is missing in the index.template.php in the theme_linktree() function is the only way the Prefix is showed, as the title in the topic and responses don't have it.

Jade Elizabeth

Wow I didn't even think about that! You fixed it!! THANK YOU THANK YOU THANK YOU!!

I was looking everywhere for errors, I already fixed one because there were no { } around a section of code that needed it...I was thinking it must have been in the sources or the javascript was somehow conflicting. So glad it's fixed!! Thank you so much!! :D

It would definitely rock if it showed at least in the first posts title but at least it's showing on the indexes for now :D. Thanks so much for your help, you're the best!! :D
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Jade Elizabeth

For anyone interested, in Redsy to get the prefix on first post only in topics.....

Find
<h5 id="subject_', $message['id'], '">

Replace the <a href code inside it with one of these two:

For only first post in topic:
<a href="', $message['href'], '" rel="nofollow">', empty($message['counter']) ? $context['prefix_subject'] . ' ' . $message['subject'] : $message['subject'] , '</a>


To get it on first post and replies (can look messy/distracting)
<a href="', $message['href'], '" rel="nofollow">' , $context['prefix_subject'] . ' ' . $message['subject'] , '</a>
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Jade Elizabeth

Also for it in the linktree edit index.template.php...

Find (close to, had to reconstruct from memory but it's at the bottom)
if(!empty($topic))
   {
      echo '
      <h2>', $context['subject'] , '</h2>';
   }



Replace
if(!empty($topic))
   {
      echo '
      <h2>' , !empty($context['prefix_subject']) ? $context['prefix_subject'] . ' ' . $context['subject'] : $context['subject'] , '</h2>';
   }
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Advertisement: