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

Pipke

yes that can be done to hide it for guests, ill look at it today to give you the code.
"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! ☕

420SA

That would be much appreciated thank you!

Pipke

#42
Quote from: seano436 on October 27, 2014, 05:45:21 PM
Hi there

Thanks for the mod it's great and exactly what I needed for my forum! There is just one problem, my forum requires a login to see any content on the forum. The problem is the Recent Topics board shows up on the login page so the public can see the Recent Topics which I don't want. I don't see any way to change the permissions?

Any suggestions?

Thanks in advance!

Ill add this option to turn this on or off for guests in next update but for now you can use this fix.
Here we go... to hide the Recent Forum Topics for Guests replace this file(see attachment)--> Subs-RecentForumTopics.php in Folder ../Sources



edit: attachment is in this post
"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! ☕

420SA

Works 100%. Thank you great support!

420SA

Sorry one more thing. I have the SMF Ads Mod as well. The ad at the top of the index now shows below the Recent Topics List. Is there any way to get the ad above the Recent Topics?

Pipke

Quote from: seano436 on October 28, 2014, 09:36:40 AM
Sorry one more thing. I have the SMF Ads Mod as well. The ad at the top of the index now shows below the Recent Topics List. Is there any way to get the ad above the Recent Topics?

Not quite easy. Because theAds mod is added to SMF with changing the core template files and NOT with hooks (no editting core files) like my mod does, but it can be done.

Try this at own risk(make backup of the files your going to change):

Remove this code from ./Themes/{Your theme}/BoardIndex.template.php

//Display ads on the board index
if (function_exists("show_boardAds"))
{
$ads = show_boardAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}


and in ./Themes/default/RecentForumTopics.template.php
find

global $context, $settings, $scripturl, $modSettings, $txt, $boarddir;


replace with

global $context, $settings, $scripturl, $modSettings, $txt, $boarddir;

//Display ads on the board index
if (function_exists("show_boardAds"))
{
$ads = show_boardAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}


Not sure if it works, but it should i guess.
NOTE. this will break the uninstall of the AdsMod.
"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! ☕

420SA

Thank you for that Pipke I will try that at a later stage. I'm sorry to come at you with all these issues but this is quite a major one as the mod has disabled Tapatalks functionality. Here's a screen shot of the error message when I try to login through Tapatalk.


420SA

Hi Pipke

Thank you so much for your fast responses.

I uploaded the attachment into the sources folder and unfortunately both the index page on pc and tapatalk don't.

I get this error when I  try to access the index page on PC

Fatal error: require_once(): Failed opening required '/RecentForumTopics.php' (include_path='.:/opt/php54/lib/php') in /public_html/Sources/Subs-RecentForumTopics.php on line 135

Pipke


Quote from: seano436 on October 29, 2014, 05:33:32 AMHi PipkeThank you so much for your fast responses. I uploaded the attachment into the sources folder and unfortunately both the index page on pc and tapatalk don't.I get this error when I  try to access the index page on PC Fatal error: require_once(): Failed opening required '/RecentForumTopics.php' (include_path='.:/opt/php54/lib/php') in /public_html/Sources/Subs-RecentForumTopics.php on line 135


oopsy i forgot the global  $sourcedir

fix in attachment agian  :P
"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! ☕

420SA

Perfect now!! Thank you so much pip!!!!

420SA

Quote from: Pipke on October 28, 2014, 10:36:41 AM
Quote from: seano436 on October 28, 2014, 09:36:40 AM
Sorry one more thing. I have the SMF Ads Mod as well. The ad at the top of the index now shows below the Recent Topics List. Is there any way to get the ad above the Recent Topics?

Not quite easy. Because theAds mod is added to SMF with changing the core template files and NOT with hooks (no editting core files) like my mod does, but it can be done.

Try this at own risk(make backup of the files your going to change):

Remove this code from ./Themes/{Your theme}/BoardIndex.template.php

//Display ads on the board index
if (function_exists("show_boardAds"))
{
$ads = show_boardAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}


and in ./Themes/default/RecentForumTopics.template.php
find

global $context, $settings, $scripturl, $modSettings, $txt, $boarddir;


replace with

global $context, $settings, $scripturl, $modSettings, $txt, $boarddir;

//Display ads on the board index
if (function_exists("show_boardAds"))
{
$ads = show_boardAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}


Not sure if it works, but it should i guess.
NOTE. this will break the uninstall of the AdsMod.


By the way I implemented it this and it totally works no problems. Thank you!

Pipke

Thanks and great for letting me know that it work for you seano436   ;D
"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! ☕

valter071

Quote from: Pipke on October 28, 2014, 10:36:41 AM

Remove this code from ./Themes/{Your theme}/BoardIndex.template.php

In my theme does not have the file BoardIndex.template.php

margarett

That means it will use the default theme one ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

umpo

Hi there,
great mod which works perfectly!
Only one question, would it be possible to have the recent topics block on the bottom part of the page? i.e. where recent posts block was placed...
I do not see any option about that.


thanks!

pcba

#55
This mod is huge excellent. I am newbie for ongoing pcb project for medium business company. Great to see you guys here. :)

Pipke

Quote from: umpo on January 29, 2015, 04:03:25 AM
Hi there,
great mod which works perfectly!
Only one question, would it be possible to have the recent topics block on the bottom part of the page? i.e. where recent posts block was placed...
I do not see any option about that.


thanks!

working on a updated version, be patience its almost done.
"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! ☕

umpo

Quote

working on a updated version, be patience its almost done.

Awesome! looking forward to try it :)

Alanar

Wonderful mod. I'm having an issue with collapsing categories though with this mod installed. Whenever I try to collapse one, it collapses the same category each time.

Pipke

Quote from: Alanar on February 19, 2015, 03:05:17 PM
Wonderful mod. I'm having an issue with collapsing categories though with this mod installed. Whenever I try to collapse one, it collapses the same category each time.

sorry for late respons, whatever issue you encounter with the collapse thingy(i don't understand what you exactly mean?), it will be fixed in next update/release.
"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: