News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Recent posts user preference

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

Previous topic - Next topic

TrueSatan

Similar to your many other queries on other topics...detailed reply given there.

Aileen

Quote from: TrueSatan on November 28, 2007, 05:48:40 AM
Similar to your many other queries on other topics...detailed reply given there.

I browsed through the mods that is applicable for my site and I ask questions in the right forum

Jade Elizabeth

you really need to try it for yourself. if its not compatible it will say so. if it doesnt want to install it will say so. then you can ask for help if you cant find the issue previously in the right topic :)
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

fizone

Thank you for great job. I'm using SMF and Mambo and want to show my forums recent post in a block (module) at Mambo's first page. Any idea how to do that?

Thanks in advance!

Jade Elizabeth

Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

fizone


Aileen

there is an error in index template php in a dilber theme

miseryshining

Quote from: will888 on November 29, 2007, 02:51:29 AM
there is an error in index template php in a dilber theme

the mod doesnt change anything in the index template file though.. and please post the exact errors from the error log.

Quote from: fizone on November 28, 2007, 08:45:30 AM
Thank you for great job. I'm using SMF and Mambo and want to show my forums recent post in a block (module) at Mambo's first page. Any idea how to do that?

Thanks in advance!

read the first post of this topic. you can use the ssi_recentPostsPref() function to put a block anywhere you want like this:


require_once('SSI.php');
if (function_exists('ssi_recentPostsPref')) ssi_recentPostsPref();


off course you have to point it to the path where your SSI.php resides.

gigabyte

Bug?

I found that my recent posts display was stuck on showing the 10 most recent threads regardless of what the users specified in their profile until I changed:

isset($context['user']['recentPosts']['nrofPosts']) && $modSettings['userprefsMode'] == 1 ? null : $settings['number_recent_posts'],

on line 547 of BoardIndex.php to:

isset($context['user']['recentPosts']['nrofPosts']) && $modSettings['userprefsMode'] == 1 ? $context['user']['recentPosts']['nrofPosts'] : $settings['number_recent_posts'],

Also, I think this must be a problem with the distro that I am using (Fedora) but I found that, to get the package to install through the package manager, I had to extract the package and re-pack it as a zip using the command "zip -X ../packagename.zip *" (the "-X" removes all the embedded file ownership and permissions settings).


miseryshining

Quote from: gigabyte on November 29, 2007, 09:05:48 PM
Bug?

I found that my recent posts display was stuck on showing the 10 most recent threads regardless of what the users specified in their profile until I changed:

isset($context['user']['recentPosts']['nrofPosts']) && $modSettings['userprefsMode'] == 1 ? null : $settings['number_recent_posts'],

on line 547 of BoardIndex.php to:

isset($context['user']['recentPosts']['nrofPosts']) && $modSettings['userprefsMode'] == 1 ? $context['user']['recentPosts']['nrofPosts'] : $settings['number_recent_posts'],

nope, when using the 'null' value the function will automatically use the users preference. maybe you had "Enable extra user preferences for recent post blocks" turned off when testing it before? you can find that option under "feature and options->user preferences".

About the package, i don't know why that didnt work. Next version ill publish in zip format.

gigabyte

#170
My mistake, it does work with the null value but it still seems to be "sticking" with previous settings for a while (even across login/logout). It's probably because I have level 1 caching enabled.

Also, is there a simple way that I can apply the "unread messages" template as is seen when appending "?action=recenttopics" to  index.php so that I can get the recent posts to display in that table form on my main page (BoardIndex.template.php) as its own block (just above the actual board index). I would also like the users' profile settings to apply of course. I guess I could do something with frames but that would be crude and "unkosher".

Thanks,
gb

gigabyte

Also, it is customary to uppercase the first letter of major words of titles and headers (e.g. the bread crumb on this forum). The string "Recent topics" should be "Recent Topics" (uppercase 'T') in your bread crumb.

Thanks for the great module,
Greg

miseryshining

No, you can't just apply that template, there are some things you'd need to hack into (like i did, as nice as possible tho ;-)). you could get an extended array of values from this mod, but would have to find a way to display that then (copy parts from the unread template and create a new template from it, or something like that).

I'll change it to uppercase in the next version.

fizone

Quote from: miseryshining on November 29, 2007, 06:00:28 AM

Quote from: fizone on November 28, 2007, 08:45:30 AM
Thank you for great job. I'm using SMF and Mambo and want to show my forums recent post in a block (module) at Mambo's first page. Any idea how to do that?

Thanks in advance!

read the first post of this topic. you can use the ssi_recentPostsPref() function to put a block anywhere you want like this:


require_once('SSI.php');
if (function_exists('ssi_recentPostsPref')) ssi_recentPostsPref();


off course you have to point it to the path where your SSI.php resides.

Thanks, I've install it and it works great for me. Only thing that I want to change in my Mambo box is to it only shows the last reply of a thread without showing boards names and date. Is it possible?

I've copied SSI.php to my root (mambo directory) and change it to point to Settings.php on line 43.


JaGuR123

#174
Quote from: miseryshining on November 20, 2007, 06:35:13 AM
sorry for the late reply; the queries in SSI.php currently don't check if a topic is locked or sticky. for topics you could quite easily add the functionality to SSI.php BUT this will make it impossible to succesfully uninstall the mod with the package manager (you'd have to remove the changes again before).

Thanks MS,

Finally got around to making the changes , and all works great thanks  :D

Is it simple to do the same thing in recentPosts as well  ??

Cheers

miseryshining

Quote from: fizone on December 07, 2007, 06:39:18 PM

Thanks, I've install it and it works great for me. Only thing that I want to change in my Mambo box is to it only shows the last reply of a thread without showing boards names and date. Is it possible?

I've copied SSI.php to my root (mambo directory) and change it to point to Settings.php on line 43.



in SSI.php search for


<td align="right" valign="top" nowrap="nowrap">
[', $post['board']['link'], ']
</td>


and remove that.

do the same for

<td align="right" nowrap="nowrap">
', $post['time'], '
</td>


there are 2 functions containing that code, you could remove it in both of them (first one is for recent posts, 2nd one for recent topics)

Quote from: JaGuR123 on December 09, 2007, 06:07:31 AM
Thanks MS,

Finally got around to making the changes , and all works great thanks  :D

Is it simple to do the same thing in recentPosts as well  ??

Cheers

no, its not possible right now since it doesnt gather any information about the topics that contain the posts. would have to change a LOT.

picos

the recent posts are showing up at the bottom of my forum but I can't change the options because it says it can't find the recentposts template file... could you help me with that?  Also how do i move the recent topics to the top of my forum so it's seen right away? Thanks!

miseryshining

Quote from: picos on December 17, 2007, 10:00:44 AM
the recent posts are showing up at the bottom of my forum but I can't change the options because it says it can't find the recentposts template file... could you help me with that? 

I think something went wrong during install. try to reinstall the mod. Did you get errors while installing?

Quote from: picos on December 17, 2007, 10:00:44 AM
Also how do i move the recent topics to the top of my forum so it's seen right away? Thanks!

Read the first post in this topic!

Angelotus

Is there a way to add more options to the dropdown list that chooses the nr of recent topics?

Apostaganha

Im getting this error:


8: Undefined index: is_read
Ficheiro: /home/apostaga/public_html/forum/Themes/default/Recent.template.php (eval?)
Linha: 159



Can someone help me on this one?

Thanks in advance!

Advertisement: