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
Bring "Add Reply Box" to top
Avatar
sintmacro
Member
Free Members
sp_UserOfflineSmall Offline
May 11, 2013 - 1:39 pm

Hi, in my previous version off the Simple Press Forums (before 4.5) I had the Reply Box at the top of my forum. I had done this to move some code in the sf-topic-view.php file. Andy had told me what and how and I could change this for a long time. Now I would like to update my forum to the new version but can't find how to change it. Can you please assist me with this. 

The code that I moved in the 4.4 version was:

# Display Add Post form (hidden)

if((!$topiclock) || ($current_user->forumadmin))
{
if($current_user->sfreply && $sfvars['displaymode'] == 'posts')
{
$out.= '<a id="dataform"></a>'."\n";
$out.= sf_add_post($sfvars['forumid'], $sfvars['topicid'], $topic['topic_name'], $topic['topic_status_set'], $topic['topic_status_flag'], $topic['user_id'], $topic['topic_subs'], $topic['topic_watches']);
}
}

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
May 11, 2013 - 2:05 pm

you no longer need to edit core files to accomplish layout changes... simple press 5 features SP themes which operate much like a wp theme...  so you just have to move around the display elements in your sp theme...

first, theme basics:  http://codex.simple-press.com/.....ng-themes/

second, make your own theme instead of editing ours:  http://codex.simple-press.com/.....g-a-theme/

then in the theme, you will have template files that are just like wp theme templates with a hierachy...  and they tend to have a loop, just like the wp loop...

so your are talking about topic view or the template file spTopicView.php in your theme template file folders...  find where the reply window is displayed:

                sp_SectionStart('tagClass=spHiddenSection', 'editor');
                    sp_PostEditorWindow($addPostForm, $editPostForm);
                sp_SectionEnd('', 'editor');

and simply move it where you want... 

you can also review that template function at the codex: http://codex.simple-press.com/.....torwindow/

to see what customization is available via arguments to the template function...  the current two arguments $addPostForm and $editPostForm are defined at the top of the template file...

Avatar
sintmacro
Member
Free Members
sp_UserOfflineSmall Offline
May 11, 2013 - 3:14 pm

Thanks MrPapa. I made a copy of the Stacked Theme and change it to my own theme. Changes of Editor place works fine. 

Many thanks.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
May 11, 2013 - 3:46 pm

no problem! glad to help.

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