News:

Wondering if this will always be free?  See why free is better.

Main Menu

Recent posts user preference

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

Previous topic - Next topic

culturejam


miseryshining

Quote from: selket on July 10, 2009, 07:30:03 PM
I'm trying to install this mode.
Please tell me how this should be done:
"
This file should not be able to execute standalone. You may have to run the following queries manually.

Query: [Select]

ALTER TABLE {$db_prefix}members ADD `recentpostBoards` TEXT NULL

Query: [Select]

ALTER TABLE {$db_prefix}members ADD `recentLastOnly` TINYINT NULL

Query: [Select]

ALTER TABLE {$db_prefix}members ADD `recentNrofPosts` TINYINT NULL

Query: [Select]

INSERT INTO {$db_prefix}settings VALUES ('recentpostsExtraprefs', 0)
"

And if I decide to uninstall the mode how this querys must be undone?

Thank you.

Are you trying to do a manual install? The mod should install automatically. when you uninstall the mod these fields will stay in the database. you can remove them manually if you want to.

Quote from: culturejam on July 11, 2009, 03:52:16 PM
Hello. I just installed this mod for 1.1.9. Everything went fine, but I have no way to access the options through the admin interface. Here's what I see when I got to Features&Settings (see attached image). It looks like the dividers are there between Layout&Options and Karma, but no heading for this mod.

Seems like it should be an easy fix, but I can't figure it out. Any ideas?


If you look in your ModSettings.english.php file (usually located in the languages dir in the default theme dir), do you see the following strings?


$txt['recentposts_title'] = 'Recent posts/topics';
$txt['recentpostsExtraprefs'] = 'Enable extra user preferences for recent post blocks';
$txt['recentpostsLimitdays'] = 'Timeframe in which to search for recent posts/topics (in days)';
$txt['recentpostsNrofposts'] = 'Number of posts to show in blocks by default';
$txt['recentpostsMode'] = 'Use recent topics mode (instead of posts) on board index';
$helptxt['recentpostsMode'] = 'Will show recent topics instead of posts for members that haven\'t set up their preferences and for guests.';


if not, they weren't added during installation.

selket

I uninstalled the mod and now I get this error on my error logs:

http://www.xxxxxx.ro/forum/index.php?pretty;action=profile&u=24

Undefined index: RP_recentPosts
Fişier: /home/fabulous/public_html/forum/Sources/Profile.php
Linie: 233

This is line 233 on Profile.php:

   $context['profile_areas']['edit_profile']['areas']['pmprefs'] = '<a href="' . $scripturl . '?action=profile;u=' . $memID . ';sa=pmprefs">' . $txt['pmprefs'] . '</a>';

Can you tell what is the problem?

miseryshining

Quote from: selket on July 27, 2009, 04:57:28 PM
I uninstalled the mod and now I get this error on my error logs:

http://www.xxxxxx.ro/forum/index.php?pretty;action=profile&amp;u=24

Undefined index: RP_recentPosts
Fişier: /home/fabulous/public_html/forum/Sources/Profile.php
Linie: 233

This is line 233 on Profile.php:

   $context['profile_areas']['edit_profile']['areas']['pmprefs'] = '<a href="' . $scripturl . '?action=profile;u=' . $memID . ';sa=pmprefs">' . $txt['pmprefs'] . '</a>';

Can you tell what is the problem?

not really, there should be a reference to "RP_recentPosts" left somewhere in there, try a search in the file (or there's some cache at work, and it should clear out later).

kyle007

First of all, thanks for this great mod. The filter options are really useful...

But i have question. By default, if a user didn't change his recent post prefs from his profile, last topics block shows all board's posts...

I want to exclude a few boards by default. For example, i have a "Off Topic" board, so i don't want the posts of it to be shown in recent post block, unless a user select it from his profile prefs...

I try this code :

Quoterequire_once('SSI.php');
if (function_exists('ssi_recentPostsPref')) ssi_recentPostsPref(null,'1,2,3,5');

number 4 (which isn't there) is my "Off topic" board id... But i get an error, says :

QuoteYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')
AND m.posterTime > 1249659240
AND (FIND_IN_SET(34, b.memberGroups) OR FI' at line 13
Dosya: /var/www/vhosts/hardwarena.com/subdomains/forum/httpdocs/SSI.php
Satır: 320

The 320. line of my SSI.php is :

QuoteLIMIT $num_recent", __FILE__, __LINE__);

What should i do, show me the solution please :)

miseryshining

Quote from: kyle007 on August 17, 2009, 11:37:31 AM
First of all, thanks for this great mod. The filter options are really useful...

But i have question. By default, if a user didn't change his recent post prefs from his profile, last topics block shows all board's posts...

I want to exclude a few boards by default. For example, i have a "Off Topic" board, so i don't want the posts of it to be shown in recent post block, unless a user select it from his profile prefs...

I try this code :

Quoterequire_once('SSI.php');
if (function_exists('ssi_recentPostsPref')) ssi_recentPostsPref(null,'1,2,3,5');

number 4 (which isn't there) is my "Off topic" board id... But i get an error, says :

QuoteYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')
AND m.posterTime > 1249659240
AND (FIND_IN_SET(34, b.memberGroups) OR FI' at line 13
Dosya: /var/www/vhosts/hardwarena.com/subdomains/forum/httpdocs/SSI.php
Satır: 320

The 320. line of my SSI.php is :

QuoteLIMIT $num_recent", __FILE__, __LINE__);

What should i do, show me the solution please :)

First I'll need to know what version you are using. In SMF 2 the syntax has changed a little, instead of the comma seperated list you have to supply an array, like so:

ssi_recentPostsPref(null,array(1,2,3,5));

kyle007

#346
No, my version is 1.1.10

Edit : Actually, forget it. I want this block not be shown to users who has  under 20 post... Sorry for my english, buy you understand me ,ha :D

What code i must use to do that ?  O:)

miseryshining

Quote from: kyle007 on August 21, 2009, 08:36:22 AM
No, my version is 1.1.10

Edit : Actually, forget it. I want this block not be shown to users who has  under 20 post... Sorry for my english, buy you understand me ,ha :D

What code i must use to do that ?  O:)

I suppose you could add a post count enabled group for that and then check if they are a member of it. it's out of the scope of this mod really :)

About 1.1, i'll have to install a test board and see if i can find the problem. will take a while.

kyle007

Ok, at least i'm waiting you to solve my default board id's issue that i've mentioned...

tarunkumar1976


HI,

   I have installed this mod . I have a custom theme. I havent done any setting .I dont see any recent posts
in the home page where i see the boards. Can you please tell me what i should do in order to see the recent posts.



TeaTephi

HEELLLOO!

Ok, Great Mod!  I installed on 1.1.10 (with Tiny Portal) and checked the boards I wanted but nothing happened?

Is it incompatible with Tiny portal or 1.1.10?

Thanks!

www.shepherdsdisciples.com
SMF 2.0.2 | TinyPortal 1.107 Veterans day theme Opera 11.50
Mods:Profile Comments.....AEVA Media 2.10.....Activity in profile.....join-reason....Bookmarks 2.3.....SA Chat    Beta 4-1 Rev43....Tapatalk SMF 2.0 RC4/RC5/Final Plugin    3.0.1.....SMFPacks Likes Lite Mod

Thank you guys for all your support and development that you do.  I love my forum, and am so thankful to have a place to ask my questions.  I do love SMF 2.0 it's smoother and all my members love it!

muttonhead

#351
Hi,

I just did a quick install of SMF and the only modification that I have made is to install recentposts_306.tgz.  The mod installation went great but I don't see anything anywhere in either the user or admin areas that indicates that it is installed.

The version of SMF that I'm using is 1.1.10.  When I go to Admin / Features and Options my choices are Basic Features / Layout and Options / Karma - I don't see anything else.

When I go to Profile, in the Modify Profile area I see a blank line with no link in between the Preferences and Notifications and Email links.

I'm brand new to SMF, so I probably missed something.  Do I need to have any other mods installed prior to installing this one to gain the functionality?

Thank you!

Bec

just installed on my 1.1.10 forum and it has come to my attention that it is not showing all recent topics - i have it set to show topics instead of posts and user preferences are disabled as I want it to just show all recent topics.... am i missing something? does it now show all recent topics as default?

jaz~

#353
Um, hi.
I'm a complete idiot at these kind of things and none of us (on the forum im a member of) really understand it well haha 8D;
so heres an explanation of what i want:

http://custom.simplemachines.org/mods/index.php?action=download;mod=654;id=59409;image
im not sure, but im assuming this mod is for the index page...? well id like that ^ for the recent posts page....
im not sure if you can do that or if its really simple (and it is actually really FOR the recent posts page) but im really bad at these things haha..
sorry if someone could explain it in a way thats not TOO complicated, or direct me to exactly the steps i need to follow... i can install mods fine but i get confused looking at all these different options and alternate options

oh and this is really stupid but what exactly is a topic block? D: is it just....blocking specific topics...? gah sorry. oh and im using smf 1.1.10
thanks so much if you help!

EDIT:// finally fixed this sorry for bothering!

mikev

Just upgraded from RC1-1 to RC1-2 and this mod is no longer working.  Is there going to be an update to this?

linette97

Quote from: mikev on November 14, 2009, 12:24:20 PM
Just upgraded from RC1-1 to RC1-2 and this mod is no longer working.  Is there going to be an update to this?

Same here.. Have RC1-2 & unable to install, would love this mod! Thanks!
Watch Documentaries Online!


Yesterday is history,
Tomorrow is a mystery,
Today is a gift,
That's why it's called the Present.

vhs

Dating online [nofollow]

Mick.


Bec

Quote from: Bec on October 14, 2009, 07:52:17 PM
just installed on my 1.1.10 forum and it has come to my attention that it is not showing all recent topics - i have it set to show topics instead of posts and user preferences are disabled as I want it to just show all recent topics.... am i missing something? does it now show all recent topics as default?

I would greatly appreciate a response!

LadyHawk

I know this mod is for 1.1.10  :P
I tried anyway installing it for 1.1.11 manualy

All went fine and everything is showing and seems to work.
But when I try to set up things in my profile I get this error:

Unknown column 'recentpostBoards' in 'field list'
File: /xxxx/xxxx/xx/xxxxxx/html/Sources/Profile.php
Line: 1033

I searched for the file and this is what shows:

Quote// Make any recent board changes that are sent with the profile..
function makeRecentPostsChanges($memID)
{
   global $db_prefix, $modSettings;

   //recent posts settings are changed
   if (isset($_POST['sa']) && $_POST['sa'] == 'recentPosts') {
      $boardRecentStr = isset($_POST['boardRecent']) ? implode(',', $_POST['boardRecent']) : 0;
      if (isset($_POST['lastOnly']))
         $recentLastOnly = 2;
      else $recentLastOnly = 1;
      if (empty($_POST['nrofPosts'])) $_POST['nrofPosts'] = 10;
   
      db_query("
         UPDATE {$db_prefix}members
         SET recentpostBoards = '{$boardRecentStr}',
         recentLastOnly = $recentLastOnly,
         recentNrofPosts = {$_POST['nrofPosts']}
         WHERE ID_MEMBER = {$memID} LIMIT 1", __FILE__, __LINE__);
   }
}

The red is line 1033
This is exactly the same as the mod says, so what am I doing wrong here?
Is there a solution, please let me know.

I use default core theme  and freshly installed 1.1.11
I use a bunch of mods (-/+) 20

Thanx for reading and hopefully a answer

Advertisement: