News:

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

Main Menu

Order Stickied Topics

Started by Nathaniel, August 09, 2008, 06:39:32 AM

Previous topic - Next topic

Don Pepito

Problem is that this part of code in babylon's MessageIndex.template doesn't exist....
      'post_poll' => array('test' => 'can_post_poll', 'text' => 'smf20', 'image' => 'new_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll'),

Garou

I haven't tested it but after a quick glance at the theme Id suggest trying...
Find...
// How about new polls, can the user post those?
if ($context['can_post_poll'])
$buttonArray[] = '<a href="' . $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new_poll.gif" alt="' . $txt['smf20'] . '" border="0" />' : $txt['smf20']) . '</a>';


Add After...
// Show the Link/Button for the Order Stickied Topics Mod.
'order_stickied_topics' => array('test' => 'can_order_stickied_topics', 'text' => 'OrderStickiedTopics_title', 'lang' => true, 'url' => $scripturl . '?action=orderstickiedtopics;board=' . $context['current_board'] . '.0;'),

Nathaniel

@Don Pepito,
Did you have any luck with that? Do you need any more help?
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

Don Pepito

I'll try it in two days, i am not at home...having some rest...then back to job....
I'll look forward to answer you as soon as i can, anyway i appreciate your labour and helpness...

habakuk

First of all, thanks for the mod. Comes in handy!

Installed fine but produced an error:

ERROR: syntax error at or near ")"
LINE 3: FROM (psf_topics as t)
^
File: /Library/Apache2/htdocs/xxx/Sources/Post.php
Line: 2836


This is on 2.0b4 using PostgreSQL as the database backend. Using a customized theme based on the default theme. No other mods installed, nothing changed in the files. Only CSS fixes so far.

Changing
FROM ({db_prefix}topics as t)

into

FROM {db_prefix}topics as t

cured the problem. Might be a difference in pgsql vs mysql SQL syntax ?

Just thought I let you know...

cheers
®



Nathaniel

@habakuk,
As you said, that is most likely an issue with a difference between pgsql and mysql SQL syntaz. Next time I update the mod I will remove that issue.
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

habakuk

Thanks. Not a big issue, it's easy to fix on the user side.

While we're at it: I do have a question about the ordering functionality. Once I've ordered let's say 5 stickies and later add three more, I get duplicate position numbers first. Then I juggle the items around up and down until each one has a unique number.

It would be cool to see the function scan the result list for missing (empty) position numbers and assign unique numbers to those. That would make it probably more reliable to order them.

Thanks & regards

Don Pepito

Quote from: Garou on December 16, 2008, 09:55:28 PM
I haven't tested it but after a quick glance at the theme Id suggest trying...
Find...
// How about new polls, can the user post those?
if ($context['can_post_poll'])
$buttonArray[] = '<a href="' . $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new_poll.gif" alt="' . $txt['smf20'] . '" border="0" />' : $txt['smf20']) . '</a>';


Add After...
// Show the Link/Button for the Order Stickied Topics Mod.
'order_stickied_topics' => array('test' => 'can_order_stickied_topics', 'text' => 'OrderStickiedTopics_title', 'lang' => true, 'url' => $scripturl . '?action=orderstickiedtopics;board=' . $context['current_board'] . '.0;'),


Now i have parse error....
unexpected T_DOUBLE_ARROW ...
Help please...

JaGuR

Installed this and changed all the correct files and the install went with out a hitch, but I can't find anything where I get to order the Sticky's  ??

Could somebody tell me what I should be looking for or post a Screenshot of what the mod should look like so I know where I may be going wrong ?

Cheers

habakuk

Look in a board that has stickies. You should notice a "Order stickied topics" button right of "New topic".


JaGuR

OK thats the problem then all I have is "mark as read", "notify", "new topic", "add poll"

So obviously a problem in my messageindex.template file

:-\

habakuk

Check the docs on the mod. It's nicely and clearly written what to check if you run into that (check the button code). ;)

JaGuR

Yes thanks, now that I no what I am looking for I should be able to find the problem ...... wasn't sure if it had to be enabled in admin and stuff, so was scratching my head  :)

JaGuR

Fixed it thank you great mod by the way

Don Pepito


Don Pepito

After some programming i found how to implement this mod to your babylon theme...
Find

// How about new polls, can the user post those?
if ($context['can_post_poll'])
$buttonArray[] = '<a href="' . $scripturl . '?action=post;board=' . $context['current_board'] . '.0;poll">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new_poll.gif" alt="' . $txt['smf20'] . '" border="0" />' : $txt['smf20']) . '</a>';


Add after:
// Show the Link/Button for the Order Stickied Topics Mod.
if ($context['can_order_stickied_topics'])
$buttonArray[] =  '<a href=" ' .$scripturl . '?action=orderstickiedtopics;board=' . $context['current_board'] . '.0;"> Order stickies </a>';

.Vapor


thedesigner

Im having a problem using this mod. Its installed fine but I cant get the sticky topics to order correctly. I want it to go up one so I click the up arrow and it skips up 5 spots, I want it to go down one and it doesnt go down at all. Whats with the values? How can I manually change them? Thanks.

Sample Lover
http://samplesite.info

habakuk

Well, you see the index value and you need to click as many times in the proper sequence to get the topic you want at top to have the highest value. It's a bit tricky to get that done, e.g. if you have 10 sticky topics ordered and add a eleventh which should end up somewhere in the middle or so... I consider it to be a fun game to guess where to click to get it done as quickly as possible.
:-)

or you can go directly to the database and manage the topics there.

DeviDarkL

Great Mod :D

Portuguese_pt translation for it ;)

<file name="$languagedir/Modifications.portuguese_pt.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
// Text for the Order Stickied Topics Mod.
$txt['OrderStickiedTopics_title'] = 'Ordenar Tópicos Inamovíveis';
$txt['OrderStickiedTopics_current'] = 'Actual Valor do \'Inamovível\' ';
$txt['OrderStickiedTopics_back'] = 'Voltar a';
$txt['OrderStickiedTopics_modify'] = 'Modificar Valor do Inamovível';
$txt['OrderStickiedTopics_unsticky'] = 'Deixar de ser Inamovível';
$txt['OrderStickiedTopics_increase'] = 'Subir';
$txt['OrderStickiedTopics_decrease'] = 'Descer';
$txt['OrderStickiedTopics_emptylist'] = 'Este quadro, de momento, não tem tópicos Inamovíveis.';
]]></add>
</operation>
</file>

Advertisement: