News:

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

Main Menu

Recent Forum Topics on Boardindex For 2.0.x

Started by Pipke, May 05, 2014, 09:37:08 AM

Previous topic - Next topic

roshaoar

Hello again Pipke,

I read all the posts you ever made on the forum here but there's no clue to this issue. I understand this has an issue with tapatalk but I don't have that installed. I also looked through all posts here mentioning this mod, and again nothing sprung to mind.

I understand this uses hooks so shouldn't affect anything, and I confess to being relatively new here so don't fully get hooks yet. But does the data used by your hook depend on something that's been broken or altered by something else ($context?).

Beyond that, looking for other info to solve this, if it helps, I have a mod that shows integration hooks. This is the info that it shows over its 4 pages:

Thank you for your time,

-Johan

integrate_actions DevCenter_Actions Subs-DevCenter.php Exists 
integrate_actions CustomReport::addActionContext  Not found Remove 
integrate_actions SayThanks::addAction  Not found Remove 
integrate_admin_areas CustomBBCodes_Admin Subs-CustomBBCodes.php Exists 
integrate_admin_areas DevCenter_adminArea Subs-DevCenter.php Exists 
integrate_admin_areas CustomReport::addAdminPanel  Not found Remove 
integrate_admin_areas SayThanks::setAdminArea  Not found Remove 
integrate_admin_areas ILA_Admin_Menu_Hook Subs-InlineAttachments.php Exists 
integrate_admin_areas beu_admin Subs-BlockEmailUsernames.php Exists 
integrate_admin_areas cls_int_admin_area cls.php Exists 
integrate_admin_areas phpInfo_menu phpInfo.subs.php Exists 
integrate_admin_areas hooks_admin_areas Subs-IntegrationHooks.php Exists 
integrate_admin_areas rft_mod_admin Subs-RecentForumTopics.php Exists 
integrate_admin_include $sourcedir/phpInfo.subs.php  Exists 
integrate_admin_include $sourcedir/Subs-IntegrationHooks.php  Exists 
integrate_bbc_buttons BBCode_Float_Button Subs-BBCode-Float.php Exists 
integrate_bbc_buttons bbcws_bbc_buttons Subs-BBCodeWithStyle.php Exists 
integrate_bbc_buttons CustomBBCodes_Buttons Subs-CustomBBCodes.php Exists 
integrate_bbc_buttons OYTE_bbc_add_button OharaYTEmbed.php Exists 
integrate_bbc_codes BBCode_Float Subs-BBCode-Float.php Exists
integrate_bbc_codes bbcws_bbc_codes Subs-BBCodeWithStyle.php Exists 
integrate_bbc_codes CustomBBCodes_BBCodes Subs-CustomBBCodes.php Exists 
integrate_bbc_codes ILA_BBCode Subs-InlineAttachments.php Exists 
integrate_bbc_codes OYTE_bbc_add_code OharaYTEmbed.php Exists 
integrate_bbc_codes mentions_bbc Mentions.php Exists 
integrate_buffer OASLT_Displays OASLT.subs.php Exists 
integrate_buffer CustomReport::customReportOb  Not found Remove 
integrate_buffer Semasa_Times Semasa.subs.php Exists 
integrate_buffer CLAAN_Links CLAAN.subs.php Exists 
integrate_display_buttons SayThanks::loadButtons  Not found Remove 
integrate_exit DevCenter_Exit Subs-DevCenter.php Exists 
integrate_general_mod_settings OASLT_Settings OASLT.subs.php Exists 
integrate_general_mod_settings Semasa_Settings Semasa.subs.php Exists 
integrate_general_mod_settings OYTE_settings OharaYTEmbed.php Exists 
integrate_general_mod_settings google_analytics_general_mod_settings GoogleAnalytics.php Exists 
integrate_general_mod_settings CLAAN_Settings CLAAN.subs.php Exists 
integrate_hide_content_implement_parameter SayThanks::setParameter  Not found Remove 
integrate_hide_content_plugin_info SayThanks::getPluginInfo  Not found Remove 
integrate_load_permissions mentions_permissions Mentions.php Exists 
integrate_load_theme loadDquote Dquote.php Exists
integrate_load_theme SayThanks::loadTheme  Not found Remove 
integrate_load_theme google_analytics_load_theme GoogleAnalytics.php Exists 
integrate_load_theme CLAAN_Texts CLAAN.subs.php Exists 
integrate_load_theme rft_load_themes Subs-RecentForumTopics.php Exists 
integrate_menu_buttons DevCenter_ErrorLogCount Subs-DevCenter.php Exists 
integrate_menu_buttons OYTE_care OharaYTEmbed.php Exists 
integrate_menu_buttons mentions_menu Mentions.php Exists 
integrate_menu_buttons rft_copyright Subs-RecentForumTopics.php Exists 
integrate_modify_features Add_CustomBBCCodes Subs-CustomBBCodes.php Exists 
integrate_modify_modifications DevCenter_prepareSettings Subs-DevCenter.php Exists 
integrate_modify_modifications SayThanks::setManagement  Not found Remove 
integrate_modify_modifications ILA_Admin_Settings_Hook Subs-InlineAttachments.php Exists 
integrate_modify_modifications beu_settings Subs-BlockEmailUsernames.php Exists 
integrate_modify_modifications cls_int_modify_modifications cls.php Exists 
integrate_modify_modifications hooks_modify_modifications Subs-IntegrationHooks.php Exists 
integrate_modify_modifications rft_mod_settings Subs-RecentForumTopics.php Exists 
integrate_output_error DevCenter_LogError Subs-DevCenter.php Exists 
integrate_pre_include $sourcedir/Subs-BBCode-Float.php  Exists 
integrate_pre_include $sourcedir/Subs-BBCodeWithStyle.php  Exists 
integrate_pre_include $sourcedir/Subs-BlockEmailUsernames.php  Exists
integrate_pre_include $sourcedir/OharaYTEmbed.php  Exists 
integrate_pre_include $sourcedir/GoogleAnalytics.php  Exists 
integrate_pre_include $sourcedir/cls.php  Exists 
integrate_pre_include $sourcedir/CLAAN.subs.php  Exists 
integrate_pre_include $sourcedir/DefaultAvatar.php  Exists 
integrate_pre_include $sourcedir/Mentions.php  Exists 
integrate_pre_include $sourcedir/Subs-RecentForumTopics.php  Exists 
integrate_pre_include $sourcedir/Subs-CustomBBCodes.php  Exists 
integrate_pre_include $sourcedir/Subs-DevCenter.php  Exists 
integrate_pre_include $sourcedir/OASLT.subs.php  Exists 
integrate_pre_include $sourcedir/Dquote.php  Exists 
integrate_pre_include $sourcedir/CustomReport/CustomReport.php  Exists 
integrate_pre_include /home/plat-linnas01/e/extreme-macro.co.uk/user/htdocs/forumstest/Sources/SayThanks.php  Exists 
integrate_pre_include $sourcedir/Subs-InlineAttachments.php  Exists 
integrate_pre_include $sourcedir/Semasa.subs.php  Exists 
integrate_pre_load DevCenter_PreLoad Subs-DevCenter.php Exists 
integrate_profile_areas SayThanks::setProfileArea  Not found Remove 
integrate_profile_areas mentions_profile_areas Mentions.php Exists 
integrate_register beu_validate Subs-BlockEmailUsernames.php Exists 
integrate_register mentions_register Mentions.php Exists



Pipke

Your Display.php file is screwed up. I suggest you uninstall one by one each mod till the errors disappear. Then you can see wich mod it is.

Q: Does the errors you get only happens when you have actived/installed my mod?
"If something is wrong, fix it if you can. But train yourself not to worry: Worry never fixes anything."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

roshaoar

#82
Hello!!

Yes - it only happens if your mod is active.

I have 2 boards, identical mods on them

This with your mod: http://extreme-macro.co.uk/forumstest/index.php
This is same without: http://extreme-macro.co.uk/forums/index.php

I'm not sure about uninstalling 60 mods to find out why yours breaks everything :(. Clearly yours depends on being able to get something out for its display, and that "something" is either missing or changed. I was hoping you'd be able to tell me what that something is given all the information I've supplied, as much as I can find out my side.

If display is the problem, would you be able to attach a display that works for you so that I can go through it and try and work out the difference between what works for you and what doesn't work here?

Pipke

when your inside/view a topic(like your screenshot), the Recent forum topics shouldnt be visible? So thats a thing that is wrong for sure.
My mod should be visible only when your on the boardindex.

Maybe this mod --> 57. Force Topic Read On Login Mod 2.1   [ Uninstall ] [ List Files ] [ Delete ]  breaks it.
"If something is wrong, fix it if you can. But train yourself not to worry: Worry never fixes anything."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

roshaoar

#84
Hello again, and thank you. That's the weird thing and why I'm trying to find a 'cause' before your mod, or rather with the data arriving at your mod. That was the index page!

I wasn't in a topic - let me show you a screengrab. Or try for yourself at the URL I've mentioned twice in this thread, you'll see the same - http://extreme-macro.co.uk/forumstest/index.php

So for some reason, with your mod, the index page thinks it's in a specific topic and that's why we get the display we get. Without your mod the page behaves as you'd expect, ie shows the forums index. So what I'm wondering is if you're calling something specific in your mod by number $someArray[1] expecting the value in that number to be something which it now isn't anymore, because it's been changed by something else.


Pipke

Your forum is calling a topic (the display.php and display.template) when your on the index of the site, for sure thats wrong in my eyes. Wich mod does that trick for you?
"If something is wrong, fix it if you can. But train yourself not to worry: Worry never fixes anything."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

roshaoar

Hello,

This is where my lack of SMF knowledge is telling because I thought that display and display.template were everything to do with anything but the forums index and that the problem here is that something seems to be getting into the forums display that shouldn't be? Sorry if this is wrong... I just don't know the software that well.

Neither of those have anything especially interesting in them, but I've attached them. See anything odd? I thought the problem would be in boardindex and the only unusual thing in there I thought was echoing out an ID of a topic to try and get at a thumbnail for it eventually.


roshaoar

fyi, I tried with a display file and a display template file from 2.0.10 clean install and it made no difference - same topic being shown, not the index

roshaoar

Also I noticed that in the buggy html below the "Recent Forum Topics" bloc, when logged in (ie seeing a comment rather than what you see, not available) the buttons all seem to call "topic=.0" (or some variant. Does this ring any bells - what would make it get that instead of what it's supposed to get? Would it help if I sent you a login to that testforum to see what I'm seeing?

In terms of trying some debugging, as I don't know smf all that well, where does the script action happen once the bloc is in - where is it getting the next bit from? Can I output an array there to see if something is wrong - which php file is responsible for the bit below yours?

Many thanks

roshaoar

Ok, big thanks to Pipke for having a look at my board with admin and FTP access. The upshot is that there's no identifiable cause for what I'm getting so we're really not much the wiser. Bound to be some mod conflict somewhere or my code tweaks foobaring it up.

Last Q though - my (very limited) understanding of mods and hooks and this mod is that instead of using the default boardindex, it used recentforumtopics and display instead. How does this happen (ie what is the bit of scripting that says "after recentforumtopics get display").

Many thanks again,

-Johan

Pipke

#90
Quote from: roshaoar on May 12, 2015, 10:18:30 AM
Last Q though - my (very limited) understanding of mods and hooks and this mod is that instead of using the default boardindex, it used recentforumtopics and display instead. How does this happen (ie what is the bit of scripting that says "after recentforumtopics get display").

I wonder that myself to. Some mod that you have installed is loading? the display.php file after my ( integrate_pre_include or themes) hook, and uses my last $topic array request  and prints the topic out on the boardindex, sorry i dont have any clue how to express this weird thing lol.

"If something is wrong, fix it if you can. But train yourself not to worry: Worry never fixes anything."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

roshaoar

Just for the record. It looks as if the mod "POST & PM INLINE ATTACHMENTS By Dougiefresh" is responsible for all the errors on my preceding posts. This seems to do something to display that I don't prefess to properly understand so I've let the author know.

Pipke

Quote from: roshaoar on May 13, 2015, 12:14:58 PM
Just for the record. It looks as if the mod "POST & PM INLINE ATTACHMENTS By Dougiefresh" is responsible for all the errors on my preceding posts. This seems to do something to display that I don't prefess to properly understand so I've let the author know.

Thx for letting me know Johan. To be clear its not responsible for that my mod isnt working, they just dont mix together.
"If something is wrong, fix it if you can. But train yourself not to worry: Worry never fixes anything."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

dougiefresh

Problem with inline attachment mod has been identified and a solution is being written.  Thanks for the report!

roshaoar

You guys are both absolute stars. Very impressed with how this has gone. Thank you both for your time, patience, and willingness to give of yourselves to time to fix this.

roshaoar

Hello,

Any easy way to limit the total # to say 50 max by adding a LIMIT in somewhere?

Thanks

Pipke

Quote from: roshaoar on January 05, 2016, 05:33:05 AM
Hello,

Any easy way to limit the total # to say 50 max by adding a LIMIT in somewhere?

Thanks

yes, modify RecentForumTopics.php like this:

Code (find) Select

if (isset($_REQUEST['start']) && $_REQUEST['start'] > 95)
$_REQUEST['start'] = 95;

Code (replace with) Select

if (isset($_REQUEST['start']) && $_REQUEST['start'] > 45)
$_REQUEST['start'] = 45;


Code (find) Select

$context['page_index'] = constructPageIndex($scripturl . '?action=forum;c=' . implode(',', $_REQUEST['c']), $_REQUEST['start'], min(100, $total_cat_posts), $rft_per_page, false);

Code (replace with) Select

$context['page_index'] = constructPageIndex($scripturl . '?action=forum;c=' . implode(',', $_REQUEST['c']), $_REQUEST['start'], min(50, $total_cat_posts), $rft_per_page, false);


Code (find) Select

$context['page_index'] = constructPageIndex($scripturl . '?action=forum;boards=' . implode(',', $_REQUEST['boards']), $_REQUEST['start'], min(100, $total_posts), $rft_per_page, false);

Code (replace with) Select

$context['page_index'] = constructPageIndex($scripturl . '?action=forum;boards=' . implode(',', $_REQUEST['boards']), $_REQUEST['start'], min(50, $total_posts), $rft_per_page, false);


Code (find) Select

$context['page_index'] = constructPageIndex($scripturl . '?action=forum;board=' . $board . '.%1$d', $_REQUEST['start'], min(100, $total_posts), $rft_per_page, true);

Code (replace with) Select

$context['page_index'] = constructPageIndex($scripturl . '?action=forum;board=' . $board . '.%1$d', $_REQUEST['start'], min(50, $total_posts), $rft_per_page, true);


Code (find) Select

$query_parameters['max_id_msg'] = max(0, $modSettings['maxMsgID'] - 100 - $_REQUEST['start'] * 6);

Code (replace with) Select

$query_parameters['max_id_msg'] = max(0, $modSettings['maxMsgID'] - 50 - $_REQUEST['start'] * 6);


Code (find) Select

$context['page_index'] = constructPageIndex($scripturl . '?action=forum', $_REQUEST['start'], min(100, $modSettings['totalTopics']), $rft_per_page, false);

Code (replace with) Select

$context['page_index'] = constructPageIndex($scripturl . '?action=forum', $_REQUEST['start'], min(50, $modSettings['totalTopics']), $rft_per_page, false);


Think this should be enough to do the trick.



"If something is wrong, fix it if you can. But train yourself not to worry: Worry never fixes anything."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

roshaoar

Thanks Pipke, I'll give this a whirl

Mayko

hello, first of all, i am newbie ok? haha.
i wanna exclude one forum of the block display, how i do this?
sorry for my bad english.

Pipke

Quote from: Mayko on February 15, 2016, 10:25:30 AM
hello, first of all, i am newbie ok? haha.
i wanna exclude one forum of the block display, how i do this?
sorry for my bad english.

That is possible, but i dont going to update/edit this version of my mod, as i wait for smf 2.1 final release, then ill update my mod with more futures.
"If something is wrong, fix it if you can. But train yourself not to worry: Worry never fixes anything."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

Advertisement: