News:

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

Main Menu

Mark sticky

Started by Bigguy, February 11, 2006, 12:20:55 AM

Previous topic - Next topic

Bigguy

In some of my forums i have "Readme" stickies,(pinned topics) as I`m sure everyone does. Sometimes you would like to edit these stickies instead of making a new post, but if you edit them there is no way they will show up as a new post on the forum index. Is there any way that we can "Mark a stickie/pinned topic new AFTER edit" so it shows as new on the forum index. I figure it would be better to be able to edit a post aand have it show up new then have to make a new post about the same thing to make it show as unread in the index. Can this be done ???

L.G.S

Or how about a 'bump' feature for Admins?

It was a feature in XMB forums, was very useful for bumping any topics the admin needed
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


Bigguy

Is there already a feature like this ??? am I missing something ???

L.G.S

Nah not in SMF.

when I mentioned XMB, it's another forum software (but not as good as SMF)
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


Bigguy

I have used XMB before. Its nice but your right not as good as smf. This feature we are talking about would really enhance it I think.

Aquilo

#5
add an admin check box to the post page template to do this

if (allowedTo('admin_forum'))
{
echo '<input type="checkbox" name="global_unread" value="1" />';
}


then in Post.php add something like

if ($_REQUEST['global_unread'])
{
$request_topic = db_query("
SELECT ID_TOPIC
FROM {$db_prefix}messages
WHERE ID_MSG = " . (int) $_REQUEST['msg'] . "
LIMIT 1", __FILE__, __LINE__);
list ($ID_TOPIC) = mysql_fetch_row($request_topic);
mysql_free_result($request_topic);

db_query("
DELETE FROM {$db_prefix}log_topics
WHERE  ID_TOPIC='$ID_TOPIC'", __FILE__, __LINE__);
}


don't know if this works just something I put together real quick, just a place/idea to start with!

Bigguy

I`ll try this on my testboard first. Not tonight its getting late. Thanks for the work you did.

L.G.S

I tried the code,

I had no idea where to place it in both files so I just put it at the bottom,
in the reply box the check box appears in the very top left of the page, and does nothing when clicked:(
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


Aquilo

like i said it's not known how it will work, but you need to find where the script sction for modifying messages in function post2() is and and check box should go in the Additional Options... section in the template.

Aquilo

#9
well this will install on SMF - 1.0.5, 1.0.6, 1.1 rc2 all others are unsupported!!

You will not see the new icon even if you uncheck return to topic!
I was not going to edit this for rc2 but I have it installed and just did it! but If there warn't so many SMF versions being used I would add a permissions setting for this so it's just generic "modify_any".

so if you are using 1.1 rc1 sorry!

http://home.aquilo.us/out/Global_UnRead.zip <- upload to your package manager, go to Packages in your Admin section, next to "Modify Global UnRead      1.0" click "[ Apply Mod ]". your done!

this modifies your default theme if you are using others you may not see the check box unless you remove Post.template.php and it's language file Post.english.php from the other themes!

Bigguy

I just installed this on my test site. It installed fine and works good. I will use it for a bit there and then try it on my live site thanks for this.

Aquilo


Bigguy

#12
hmm, I must take back what I said. I have tried this on 2 different boards and as far as I can tell it doesnt mark the topic unread. I have tried it with 2 different browser and cache and cookies cleaned. What would the problem be ???

EDIT: is it because the board sees me from the same ip all the time and knows I`ve already read them, that shouldnt be it as I cleaned out the temp files.

EDIT2: I get this error in the error log is this from this mod ??? :

http://***********/index.php?topic=13.new
Apply Filter: Only show the errors with the same message
8: Undefined offset: 799
File: /home/exofire/public_html/support/Sources/Load.php
Line: 1759

L.G.S

FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


Aquilo

I don't think your IP would have a play in it, and I can't reproduce the error in 1.0.6 or rc2. I am doing this on my localhost but I don't think that would show me it's working and it not work else where, I will not have till to see about this today but if there is still a problem I'll look at it tomarrow!

I just installed it on 2 live 1.0.5 boards on a linux box and it's not showing so I look into it!!!!

Aquilo


Aquilo

Quote from: Aquilo on February 14, 2006, 07:04:10 AM
I just installed it on 2 live 1.0.5 boards on a linux box and it's not showing so I look into it!!!!
well it does work on one of them, but then anounce is not even working on the other! :-\

Aquilo

#17
ok once I did what I posted and deleted the template files everything works on both live boards! you have to take into concideration that this last board is so old [unknown] kept trying to get be to update to 1.0.5 for over a year so the theme files where from beta 1 versions! but every thing is working!

Bigguy

So what do I do to get it working, Delete a file or two ???

L.G.S

I installed but nothing has changed on the default theme.
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


Bigguy

its in the additional options when you make a post. Its says something like "Mark unread for all users"

L.G.S

Yeah I've looked,

but the thing is, if I post anyway, that thread would then be bumped, not needing the button
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


Bigguy

This option is so you dont have to post in a sticky thread to have it marked new. You can edit the sticky and check that, saving a post. I thought it was a good idea. :)

L.G.S

o it's only sticky

any chance of all threads?
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


Aquilo

you cant just bump a message without some extra db modifications, SMF only uses sticky and the last message id to sort topics.

Quote from: Bigguy on February 14, 2006, 02:06:23 PM
This option is so you dont have to post in a sticky thread to have it marked new. You can edit the sticky and check that, saving a post. I thought it was a good idea. :)
this is what it was for!

Bigguy

So this mod works now ??? I would like to install it if I could. Is it working ???

Aquilo

Quote from: Bigguy on February 15, 2006, 09:23:26 PM
So this mod works now ??? I would like to install it if I could. Is it working ???

from my testing yes it is, it is working on both my 1.0.5 sites and my rc2 test site! all three installed from the package manager, only manual thing to do is remove the few template files from any other then default!

Bigguy

What do you mean by this ??

Quoteonly manual thing to do is remove the few template files from any other then default!

Aquilo

please see the RED BOLD test at end of this quote!

Quote from: Aquilo on February 14, 2006, 12:34:20 AM
well this will install on SMF - 1.0.5, 1.0.6, 1.1 rc2 all others are unsupported!!

You will not see the new icon even if you uncheck return to topic!
I was not going to edit this for rc2 but I have it installed and just did it! but If there warn't so many SMF versions being used I would add a permissions setting for this so it's just generic "modify_any".

so if you are using 1.1 rc1 sorry!

http://home.aquilo.us/out/Global_UnRead.zip <- upload to your package manager, go to Packages in your Admin section, next to "Modify Global UnRead      1.0" click "[ Apply Mod ]". your done!

this modifies your default theme if you are using others you may not see the check box unless you remove Post.template.php and it's language file Post.english.php from the other themes!

Bigguy


L.G.S

Or you could just edit the other themes files instead of potentially ruining it.
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


Aquilo

Quote from: L.G.S on February 17, 2006, 05:21:57 AM
Or you could just edit the other themes files instead of potentially ruining it.
as long as they are not edited for the new theme it does not matter.
and I don't have time to look at any other theme other then default!

L.G.S

the new theme, if it had those files in, would mean they are specially coded for that skin, right?

If so, deleting them would mess up how it it set out
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


Bigguy

I have just tested this on smf 1.1 RC2 and the default theme and my members say it doesnt mark any stickies unread.

Bigguy

Is there a chance of getting the package again from you. ???

Advertisement: