News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Keeping specific post at the top of a topic

Started by bryanp, January 27, 2015, 01:21:23 PM

Previous topic - Next topic

bryanp

Hi all,

I am setting up my first SMF forum. So far its going great! My client asked if there was a way to make the admins' post stay just below the OP and have all other posts follow in chronological order from there on. I think this would be great as the forum is an "ask the experts" type of forum.

Thanks in advance!
BP


bryanp

Seems like a good solution, although I went through all installation steps and I got an error - "Cannot install - please verify you put this in the same place as SMF\'s index.php and SSI.php files." This is coming from the install-2.php file. I do have it in the same directory as my SMF's index.php and SSI.php files....

Any suggestions?

Kindred

why did you not use the package manager to install it automatically, like any other mod?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

bryanp

I typically like to try and install it manually to see what code I'm adding to understand it more completely. I did just install this mod with the package manager and got a parse error when trying to look at a topic.

Kindred

well, mannually installing mods means that
a) you have no actual record of the installation
b) you could make a manual mistake...

using the package manager handles the installation, the creation of db tables, etc...
I do not believe that you would get a parse error after a package manager installation (if you got no errors on the install)...   If you did -- that suggests that you had some manually done code which you didn't do correctly or that there WERE errors in the automatic install which you ignored.

I have installed over 200 mods in a single forum using the package manager and didn't trigger a single parse error... (although I did have a few code lines that conflicted with other mods and this required a manual tweak for that specific line)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

bryanp

Good point. As I said I am new so I will make sure to start using the package manager. But for now, how can I fix my parse error?

Template Parse Error!

There was a problem loading the /Themes/default/Display.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in .../Themes/default/Display.template.php on line 238
229:
230: // Show the message anchor and a "new" anchor if this message is new.
231: if ($message['id'] != $context['first_message'])
232: echo '
233: <a id="msg', $message['id'], '"></a>', $message['first_new'] ? '<a id="new"></a>' : '';
234:
235: echo '
236: <div class="', $message['approved'] ? ($message['alternate'] == 0 ? 'windowbg' : 'windowbg2') : 'approvebg'  '">
237: <span class="topslice"><span></span></span>
238: <div class="post_wrapper">';
239:
240: // Show information about the poster of this message.
241: echo '
242: <div class="poster">

Arantor

Line 236 needs to be:
<div class="', $message['approved'] ? ($message['alternate'] == 0 ? 'windowbg' : 'windowbg2') : 'approvebg', '">

Kindred

yup...  that's the line I saw an issue with as well.... :)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

bryanp

Thank you for your help and suggestions on how to use mods!

kat

In case you don't know of it's existence, Bryan, you might fancy reading around our wiki, when you have a spare day, or two. ;)

http://wiki.simplemachines.org

Steve

Amazing what one character can do. I compared line 236 with Arantor's corrected version 3 times before I saw what the difference was. :P
DO NOT pm me for support!

Arantor

A comma, yes. Sometimes unnecessary, sometimes not.

hitsme

#13
Quote from: bryanp on January 27, 2015, 01:21:23 PM
Hi all,

I am setting up my first SMF forum. So far its going great! My client asked if there was a way to make the admins' post stay just below the OP and have all other posts follow in chronological order from there on. I think this would be great as the forum is an "ask the experts" type of forum.

Thanks in advance!
BP
is this this  what you are looking for

Kindred

hitsme... NO IT IS NOT...

You seem to have a serious issue with not actually READING what the original poster has said.

He doesn't want a site-wide wiki...
He doesn't want the post-specific wiki that you asked for...

he wants to take a SINGLE post from the thread and have it displayed second in the thread (right after the OP) regardless of where it was actually posted...

And to that end, the "best answer" mod is actually pretty close to what he asked for. NOT A WIKI
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

hitsme

Quote from: Kindred on January 28, 2015, 07:27:15 AM
hitsme... NO IT IS NOT...

You seem to have a serious issue with not actually READING what the original poster has said.

He doesn't want a site-wide wiki...
He doesn't want the post-specific wiki that you asked for...
if you look again it's not site wide it's a post-specific wiki

Quote from: Kindred on January 28, 2015, 07:27:15 AM
he wants to take a SINGLE post from the thread and have it displayed second in the thread (right after the OP) regardless of where it was actually posted...

And to that end, the "best answer" mod is actually pretty close to what he asked for. NOT A WIKI
with this you may be right
Thanks

Advertisement: