News:

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

Main Menu

Enhancements to recent posts

Started by davidhs, October 01, 2013, 02:37:41 PM

Previous topic - Next topic

davidhs

Quote from: Zirkon on May 31, 2016, 09:54:15 PM
Before I begin just want to say I love this forum mod. Hope this is the right place to post this.

Right now I'm having a problem with this mod.

"Show unread posts since last visit" and "Show new replies to your posts" works as they should.

"Show all unread posts"  when clicked on though will show replies that I have just done, and ones I have read already. It will not clear the list of unreads nor will it take you to the actual new unread part of the thread. It will take you to the first post of the thread.

Any idea on how I can resolve this.

I had a problem with my site recently and had to do the large upgrade file refresh. Everything is working now except this mod. Cannot figure out how to get it to work again like it should.

Any help would be appreciated.
This mod not creates unread posts lists, only shows links to these lists. Lists are generated by SMF code.
(for example "Show all unread posts", is like http://www.simplemachines.org/community/index.php?action=unread;all;start=0 here)

I think you have a problem in your forum and you must ask in SMF support section.

Grammy

Hi, works great!  Just have this one error:

Undefined index: rpe

Admin-RecentPostsEnhancement.php, line 21



$admin_areas['config']['areas']['modsettings']['subsections']['rpe'] = array($txt['rpe']);


If that's one of those "isset" things, I have no idea how to fix it.   :D

davidhs

Quote from: Grammy on June 01, 2016, 08:57:02 AM
Hi, works great!  Just have this one error:

Undefined index: rpe

Admin-RecentPostsEnhancement.php, line 21



$admin_areas['config']['areas']['modsettings']['subsections']['rpe'] = array($txt['rpe']);


If that's one of those "isset" things, I have no idea how to fix it.   :D

I do not know because of this error... :(

What is your SMF version?
And what version of this mod is used? Install last version if it is not used.

Grammy

#43
Quote from: davidhs on June 01, 2016, 10:46:00 AM
I do not know because of this error... :(

What is your SMF version?
And what version of this mod is used? Install last version if it is not used.

It's SMF 2.0.11, default.  I downloaded RecentPostsEnhancement_2.0.6.tar.gz.

I thought it might be one of those missing "isset" statements that verify that the index exists before you attempt to access it, but what do I know about it?  Nothing plus nothing.   :D




Undefined index: rpe

Admin-RecentPostsEnhancement.php, line 21


Here's the block of code around it:

if (!defined('SMF'))
die('Hacking attempt...');

// Adds admin area.
function rpe_admin_areas(&$admin_areas)
{
global $txt;

$admin_areas['config']['areas']['modsettings']['subsections']['rpe'] = array($txt['rpe']);
}


   


EDIT:  I got the error to go away by changing this:

if (!defined('SMF'))
die('Hacking attempt...');

// Adds admin area.
function rpe_admin_areas(&$admin_areas)
{
global $txt;

$admin_areas['config']['areas']['modsettings']['subsections']['rpe'] = array($txt['rpe']);
}


to this:

if (!defined('SMF'))
die('Hacking attempt...');

// Adds admin area.
if (isset($txt['rpe']))   
{
function rpe_admin_areas(&$admin_areas)
{
global $txt;

$admin_areas['config']['areas']['modsettings']['subsections']['rpe'] = array($txt['rpe']);
}
}



Is that okay?

davidhs

Quote from: Grammy on June 01, 2016, 11:30:36 AM
Quote from: davidhs on June 01, 2016, 10:46:00 AM
I do not know because of this error... :(

What is your SMF version?
And what version of this mod is used? Install last version if it is not used.

It's SMF 2.0.11, default.  I downloaded RecentPostsEnhancement_2.0.6.tar.gz.

I thought it might be one of those missing "isset" statements that verify that the index exists before you attempt to access it, but what do I know about it?  Nothing plus nothing.   :D




Undefined index: rpe

Admin-RecentPostsEnhancement.php, line 21


Here's the block of code around it:

if (!defined('SMF'))
die('Hacking attempt...');

// Adds admin area.
function rpe_admin_areas(&$admin_areas)
{
global $txt;

$admin_areas['config']['areas']['modsettings']['subsections']['rpe'] = array($txt['rpe']);
}


   


EDIT:  I got the error to go away by changing this:

if (!defined('SMF'))
die('Hacking attempt...');

// Adds admin area.
function rpe_admin_areas(&$admin_areas)
{
global $txt;

$admin_areas['config']['areas']['modsettings']['subsections']['rpe'] = array($txt['rpe']);
}


to this:

if (!defined('SMF'))
die('Hacking attempt...');

// Adds admin area.
if (isset($txt['rpe']))   
{
function rpe_admin_areas(&$admin_areas)
{
global $txt;

$admin_areas['config']['areas']['modsettings']['subsections']['rpe'] = array($txt['rpe']);
}
}



Is that okay?
This error should not occur... And $txt['rpe'] is important. You can replace

$admin_areas['config']['areas']['modsettings']['subsections']['rpe'] = array($txt['rpe']);

by

$admin_areas['config']['areas']['modsettings']['subsections']['rpe'] = array(isset($txt['rpe']) ? $txt['rpe'] : 'Enhancements to recent posts');





One question more: What is the language of your forum?

$txt['rpe'] must be on YOUR_FORUM/Themes/languages/modifications.YOUR_LANGUAGE.php.

Perhaps you have an error on this file... If you can, attach this file here.




This week I am out home. Next week I return and I will see in my test forum.

Grammy

Quote from: davidhs on June 02, 2016, 04:46:56 AM

This error should not occur... And $txt['rpe'] is important. You can replace

$admin_areas['config']['areas']['modsettings']['subsections']['rpe'] = array($txt['rpe']);

by

$admin_areas['config']['areas']['modsettings']['subsections']['rpe'] = array(isset($txt['rpe']) ? $txt['rpe'] : 'Enhancements to recent posts');





One question more: What is the language of your forum?

$txt['rpe'] must be on YOUR_FORUM/Themes/languages/modifications.YOUR_LANGUAGE.php.

Perhaps you have an error on this file... If you can, attach this file here.




This week I am out home. Next week I return and I will see in my test forum.


That edit also keeps the error from happening; thanks for that!   :)

My forum language is English.  I'm attaching the Modifications.english.php file.  Absolutely no rush; just whenever you have time and thanks again!

davidhs

Quote from: Grammy on June 02, 2016, 08:52:06 AM
Quote from: davidhs on June 02, 2016, 04:46:56 AM

This error should not occur... And $txt['rpe'] is important. You can replace

$admin_areas['config']['areas']['modsettings']['subsections']['rpe'] = array($txt['rpe']);

by

$admin_areas['config']['areas']['modsettings']['subsections']['rpe'] = array(isset($txt['rpe']) ? $txt['rpe'] : 'Enhancements to recent posts');





One question more: What is the language of your forum?

$txt['rpe'] must be on YOUR_FORUM/Themes/languages/modifications.YOUR_LANGUAGE.php.

Perhaps you have an error on this file... If you can, attach this file here.




This week I am out home. Next week I return and I will see in my test forum.


That edit also keeps the error from happening; thanks for that!   :)

My forum language is English.  I'm attaching the Modifications.english.php file.  Absolutely no rush; just whenever you have time and thanks again!
Sorry, I do not see any error on your language file. I will see next week this.

You do not add isset in code because this function is necessary in order to show admin area.

davidhs

Quote from: davidhs on June 02, 2016, 09:31:58 AM
Quote from: Grammy on June 02, 2016, 08:52:06 AM
Quote from: davidhs on June 02, 2016, 04:46:56 AM

This error should not occur... And $txt['rpe'] is important. You can replace

$admin_areas['config']['areas']['modsettings']['subsections']['rpe'] = array($txt['rpe']);

by

$admin_areas['config']['areas']['modsettings']['subsections']['rpe'] = array(isset($txt['rpe']) ? $txt['rpe'] : 'Enhancements to recent posts');





One question more: What is the language of your forum?

$txt['rpe'] must be on YOUR_FORUM/Themes/languages/modifications.YOUR_LANGUAGE.php.

Perhaps you have an error on this file... If you can, attach this file here.




This week I am out home. Next week I return and I will see in my test forum.


That edit also keeps the error from happening; thanks for that!   :)

My forum language is English.  I'm attaching the Modifications.english.php file.  Absolutely no rush; just whenever you have time and thanks again!
Sorry, I do not see any error on your language file. I will see next week this.

You do not add isset in code because this function is necessary in order to show admin area.
Hi, I am at home. In my test forum I have not this error log... :o

Do you see admin area of this mod like this image?


Can you attach an image of your error log?


aegersz

damn, I wish I knew about this earlier as I have spent much time adding menu buttons and installing mods to achieve much the same thing.

a very handy mod !
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here


davidhs

Compatible with SMF 2.0.14 and 2.0.15.

jack208

Quote from: davidhs on November 25, 2017, 10:50:37 AM
Compatible with SMF 2.0.14 and 2.0.15.

Just a bump to confirm this works well on ver 2.0.15.

It does throw errors on the Core theme (not the Default theme, which installed properly). We don't use the core theme for now so didn't make those manual code updates. If we do, will share the updated files here.

Thanks for the mod, David!

davidhs

Quote from: jack208 on July 14, 2018, 08:34:41 PM
Quote from: davidhs on November 25, 2017, 10:50:37 AM
Compatible with SMF 2.0.14 and 2.0.15.

Just a bump to confirm this works well on ver 2.0.15.

It does throw errors on the Core theme (not the Default theme, which installed properly). We don't use the core theme for now so didn't make those manual code updates. If we do, will share the updated files here.

Thanks for the mod, David!
Yes, this mod install wiithout errors only in default theme and similars, not in core theme.

If you want install in core theme, you can install with errors and modify by hand theme files.

davidhs

New version:
2.0.7   2018-07-26
------------------
@ SMF 2.1 Beta 3: Links are not displayed when user is a guest.
! SMF 2.0.x: Error in HTML code.
+ SMF 2.1 Beta 3: Links in the categories.
+ SMF compatibility: 2.0.12 to 2.0.15 and 2.1 Beta 3.
* SMF 1.1.x and 2.0.x: Languages: Title of each list is used in links.

davidhs

New version:
2.0.8   2019-04-12
------------------
! SMF 2.1 Beta 3: Links were not displayed when user was a guest.
+ Actions of Administration panel are logged to Administration log.
@ Administration log does not exists in SMF 1.1.x.
+ SMF compatibility: 2.1 RC1 to RC2.
+ Languages: New language string in portuguese_brazilian, portuguese_brazilian-utf8, portuguese_pt, portuguese_pt-utf8, thanks to Americano.

davidhs

New version:
2.0.9   2019-05-02
------------------
! SMF 2.x: The Quick Search of the Administration Center look for in settings variables of MOD.

davidhs

Compatible with SMF 2.0.16 and 2.0.17.

davidhs

New version:
2.0.10  2021-02-15
------------------
! SMF 1.1.x: Use HTML entities in UTF-8 languages.
! SMF 2.0.x: Do not use HTML entities in ISO-8859-1 languages.
! SMF 2.x: The Quick Search of the Administration Center look for in settings variables of MOD.
+ SMF compatibility: 2.0.16-2.0.18 and 2.1 RC3.

Gryzor

Anyone tried it on 2.1.x? Tests are failing for me.

Advertisement: