News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Recent posts user preference

Started by miseryshining, March 19, 2007, 05:37:32 PM

Previous topic - Next topic

miseryshining

Quote from: KD4FBI on August 12, 2008, 09:10:14 PM
Will this mod work with the "Simple Portal" mod?
I would like to be able to show the custom block for Recent Posts to show as one of the blocks in the Simple Portal but don't know how.
Simple Portal says it will show the recent posts and recent topics blocks, but it doesn't show the user's preferences in those blocks, just the last X number of posts/topics. With Simple Portal, I can set up "specialized" blocks using html, php or bbc, so I'm thinking I may be able to use one of those blocks to show the info for the Recent Posts mod. I just don't know how or what should go into them.
I am definitely NOT a programmer, so "dummies" version of help will be greatly appreciated.

Thanks in advance,
Mickey

it will work if it allows you to add php code in a block. just use


require_once('location/to/SSI.php');
if (function_exists('ssi_recentPostsPref')) ssi_recentPostsPref();


You could have also found this in the opening post which describes exactly how to make things work.

Quote from: LHVWB on August 15, 2008, 05:01:55 AM
There is a bug with this mod, for SMF 2 Beta. On line 794 of the 'RP_2.mod' file, in the 'RecentTopics()' function which is added to the 'Recent.php' source file. It occurs in the "recentPosts_301.tar.gz" package. ;)

This Code:
         AND b.id_boardNOT IN (" . implode(', ', $exclude_boards) . ")") . (!empty($include_boards) ? "

Should be replaced with this code:
         AND b.id_board NOT IN (" . implode(', ', $exclude_boards) . ")") . (!empty($include_boards) ? "


The 'b.id_boardNOT' part, returns db errors.

Read the topic below for reference:
http://www.simplemachines.org/community/index.php?action=post2

thanks for resolving that, i posted a new package with the fix included.

Quote from: KD4FBI on August 17, 2008, 04:24:23 PM
I looked through this thread and couldn't find what I need to know.
I am using SMF 1.1.5, UserCP 2.0, Recent Posts user preference 3.01. The Recent Posts mod installed fine, I know I need to add the code that calls the SSI function. In the thread, I keep seeing people saying to put the code where ever you want the box to show, but I have NO clue which template file to even start to look at.
I would like the box for the recent posts that the user selects to be shown either on the front page or in their profile - whichever one will be easiest to do.
I am definitely not a programmer by any stretch of the imagination (and my imagination is pretty wild), so a "dummies" version of help is greatly appreciated.

Thanks in advance,
Mickey

You will have to read a bit about how theming works for SMF. I posted a link to some articles in the help section a few pages back in this topic. Look in the opening post for detailed instructions on how you can integrate the recent posts list.

et10yl

#281
Great mod! Thanks!

Not sure if someone else has already done this, but I edited my Recent.template.php so that it would have a dropdown where users could select to see Recent Topics.

Attaching 2 screenshots.

Before running the Recent Topics search, note the added form on the right of the screen for selecting days worth of topics

After running Recent Topics search, note the text display under the link tree disclaiming that these are all the topics posted in the last X days.


Basically, my edits to Recent.Template.php are as follows:

         <td>', theme_linktree(), '</td>

Replace "</td>" with


<!-- start: Addition to show last "X" days worth of topics"-->';
if($_POST["action"]=="recenttopics"){
echo '
<span class="middletext" style="font-weight:bold;">
<BR>Now displaying ALL topics (read or unread) in the last '.$_POST["limit"].' day(s).
<BR>To get back to seeing just the unread topics, <a href="index.php?action=unread">click here</a>
<BR><BR>
</span>
<!-- end: Addition to show last "X" days worth of topics"-->';
}
echo '
</td>
<!-- start: Addition to show last "X" days worth of topics"-->
<td align="right">
<table border=0 class="middletext" style="font-weight:bold;">
<tr>
<td>Recent Topics in the last</td>
<td>
<form action="index.php" method="POST">
<select name="limit">
<option value=1>1</option>
<option value=2>2</option>
<option value=3>3</option>
</select>
<input type="hidden" name="action" value="recenttopics">
</td>
<td>days</td>
</tr>
<tr>
<td valign="middle" colspan=3>
<input type="submit" value="submit">
</form></td>
</tr></table>
</td>
<!-- end: Addition to show last "X" days worth of topics"-->

miseryshining

Nice addition indeed, i added it under 'hacks' in the first post of this topic. Thanks for posting it here!

et10yl

^^ thanks! :) and you're welcome... it's my first real post that could be useful to others here. the rest of my posts so far have been questions (so i think) :D feels good to be able to "give back." thanks again for the awesome mod.

Nequil

#284
Hi,

I have a little problem, how I can separated (add space) name of topic from page numbers?



thanks for help.

miseryshining

Quote from: Nequil on August 29, 2008, 05:42:17 PM
Hi,

I have a little problem, how I can separated (add space) name of topic from page numbers?



thanks for help.

you'll probably have to edit the stylesheet of your theme (and give the left column a fixed width).

tasorli

Hi..

I installed this package, but want to uninstall it.. When i press "Uninstall" from admin-area, I get this error message:

This package cannot be uninstalled, because there is no uninstaller!

Please contact the mod author for more information. 

Is there a way of uninstalling "Recent Post User Interface"?

miseryshining

Quote from: tasorli on September 08, 2008, 11:10:58 AM
Hi..

I installed this package, but want to uninstall it.. When i press "Uninstall" from admin-area, I get this error message:

This package cannot be uninstalled, because there is no uninstaller!

Please contact the mod author for more information. 

Is there a way of uninstalling "Recent Post User Interface"?

what version of SMF are you using?

tasorli

I'm sorry..

I'm using version 1.1.6.

hxxp:www.norskfilmforum.com [nonactive]

miseryshining

Quote from: tasorli on September 08, 2008, 02:30:25 PM
I'm sorry..

I'm using version 1.1.6.

http://www.norskfilmforum.com

the mod doesnt support 1.1.6 officially, so that's why it tells you it lacks uninstall information. I assume you installed it on an earlier version of SMF and upgraded later?

I'd advise to uninstall the 1.1.6 upgrade package from the package manager, then uninstall the recent posts mod, then reinstall the 1.1.6 package.

By the way, did you run into any problems using it on 1.1.6?

tasorli

No, non problems with 1.1.6 so far.. (If you don't count this in as a problem). :)

Thank you for your're advice. I will try it.

Nequil

please update this mod to 1.1.6 smf version!

ellion


Nequil

#293
1.

Quote
Hi,

I have a little problem, how I can separated (add space) name of topic from page numbers?



Quotemiseryshining: you'll probably have to edit the stylesheet of your theme (and give the left column a fixed width).

problem fixed:

find in Recent.template.php:
<img src="' . $settings['images_url'] . '/icons/show_sticky.gif" align="right" alt="" style="margin: 0;" />' : '', $topic['first_post']['link'], $topic['is_read'] == 0 ? ' <a href="'. $topic['new_href']. '"><img src="'. $settings['images_url']. '/'. $context['user']['language']. '/new.gif" alt="'. $txt[302]. '" /></a>' : '', '<span class="smalltext">', $topic['pages'], ' ', $txt['smf88'], ' ', $topic['board']['link'], '</span></td>

replace:
<img src="' . $settings['images_url'] . '/icons/show_sticky.gif" align="right" alt="" style="margin: 0;" />' : '', $topic['first_post']['link'], $topic['is_read'] == 0 ? ' <a href="'. $topic['new_href']. '"><img src="'. $settings['images_url']. '/'. $context['user']['language']. '/new.gif" alt="'. $txt[302]. '" /></a>' : '', ' <span class="smalltext">', $topic['pages'], ' ', $txt['smf88'], ' ', $topic['board']['link'], '</span></td>

2.
ok... so I did a litlle update to smf 1.1.6 (mod in attach).

ellion

i have tried a couple of times to install this and i keep encountering the same problem.

the package will install correctly with no errors, when i view the recent topics page i get a small box giving me an error message about the recent.template (or recent.php i am not sure which it was now)

any ideas what might be wrong.

Marcuss

Hi!  :)
for the installation on 1.1.6 i can use the manual installation instructions for the 1.1.5?

thank u


Marcuss


vietravel247.com

Quote from: tasorli on September 08, 2008, 02:30:25 PM
I'm sorry..

I'm using version 1.1.6.

http://www.norskfilmforum.com
Me too.
I install(manual) version 3.02 but I can't change option.  When I click on " Recent posts/topics" its not show to change opion(view my attach picture).
Please help me. Thank you very much.     

miseryshining

Mod is updated!

3.03:  minor update to support SMF 1.1.6 and 2 beta 4.

miseryshining

Quote from: vietravel247.com on October 09, 2008, 11:23:55 AM
Quote from: tasorli on September 08, 2008, 02:30:25 PM
I'm sorry..

I'm using version 1.1.6.

http://www.norskfilmforum.com
Me too.
I install(manual) version 3.02 but I can't change option.  When I click on " Recent posts/topics" its not show to change opion(view my attach picture).
Please help me. Thank you very much.     


can you check if it prints anything in the error log?

Advertisement: