News:

SMF 2.1.3 has been released! Take it for a spin! Read more.

Main Menu

Smf Pages System

Started by Doug Heffernan, January 25, 2022, 02:08:09 PM

Previous topic - Next topic

Shambles

It won't add it to my forum :P   (2.0.19)

Mick.

Quote from: Shambles on January 25, 2022, 02:23:57 PMIt won't add it to my forum :P   (2.0.19)
Looks like it's only for 2.1 RC4, 2.1 RC1, 2.1 RC2, 2.1 RC3


Mick.

Quote from: Doug Heffernan on January 25, 2022, 02:29:10 PM
Quote from: Shambles on January 25, 2022, 02:23:57 PMIt won't add it to my forum :P  (2.0.19)

That was a good one  ;D
Oh. Ha!

Nice mod tho'. I dloaded it, now thinking on what can I use it for. I loved the custom action action mod and this should do the same. I dig it.

-Rock Lee-

I'm just testing some things in 2.1 so if I can add this to see how it goes :P, great job!

After let the translation Spanish ::)


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

Shades.

I created a page and when I click on it in admin it says "You are not allowed to access this section". ???

I thought it was me but I just installed two fresh (Nightly) test sites just to see and had the same error on both.
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Doug Heffernan

Quote from: Shades. on January 25, 2022, 04:12:18 PMI created a page and when I click on it in admin it says "You are not allowed to access this section". ???

I thought it was me but I just installed two fresh (Nightly) test sites just to see and had the same error on both.

Can you re-download it again, give it another try and let me know how it will go?

Shades.

Cool works great! I like it! 8)
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean


Shades.

How do I remove "Pages" from the top menu bar? O:)
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Doug Heffernan

Quote from: Shades. on January 25, 2022, 04:51:19 PMfrom the top menu bar?

Do you mean to remove the menu button altogether?

Shades.

Yes :)

Since there are no per page permissions I'd like to make only certain pages visible in the menu via ultimate menu mod. ;)
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Doug Heffernan

Quote from: Shades. on January 25, 2022, 05:01:00 PMYes :)

Since there are no per page permissions I'd like to make only certain pages visible in the menu via ultimate menu mod. ;)

At the Subs-Pages.php file inside sources, replace the pages_menu_button function with this:

function pages_menu_button(&$menu_buttons)
{
   loadLanguage('Pages');
   return false;
}

Diego Andrés

You'd probably need to add the return AFTER loading the language file  :P

//Add the pages button at the navigation.
function pages_menu_button(&$menu_buttons)
{
	
loadLanguage('Pages');

	
return 
false;
}

SMF Tricks - Free & Premium Responsive Themes for SMF.

Doug Heffernan

Quote from: Diego Andrés on January 25, 2022, 05:09:31 PMYou'd probably need to add the return AFTER loading the language file  :P

//Add the pages button at the navigation.
function pages_menu_button(&$menu_buttons)
{
	
loadLanguage('Pages');

	
return 
false;
}


Forgot about that. Thanks for the reminder :)

Shades.

#16
For some resason that cause my first test site a 500 error so I reuploaded the original sub-pages.php and cleared browser and now its still a 500 error page.

So I tried the 2nd test site and same thing! Now both are showing 500 error pages and I've verified all file are there and permissions are correct. I don't know what happened! :o

Edit: restore_setting.php got the site back up but had to disable all hooks
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Doug Heffernan

Quote from: Shades. on January 25, 2022, 05:36:25 PMFor some resason that cause my first test site a 500 error so I reuploaded the original sub-pages.php and cleared browser and now its still a 500 error page.

So I tried the 2nd test site and same thing! Now both are showing 500 error pages and I've verified all file are there and permissions are correct. I don't know what happened! :o

Edit: restore_setting.php got the site back up but had to disable all hooks

Do you mean that the 500 error you got was for the whole forum and not just the pages? That is strange, there is nothing in the code that would cause that. And the 500 errors is more of a server issue. Anyways, is there any specific error pertaining to this logged in the error log?

Shades.

Quote from: Doug Heffernan on January 26, 2022, 11:42:27 AMDo you mean that the 500 error you got was for the whole forum and not just the pages? That is strange, there is nothing in the code that would cause that. And the 500 errors is more of a server issue. Anyways, is there any specific error pertaining to this logged in the error log?
Yes for the whole forum. No errors in admin and it only happens when I change the code in sub_pages.php to what to what you posted...weird! :o

Have you tried the code above to see if it happens to you?
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Doug Heffernan

Quote from: Shades. on January 26, 2022, 01:53:09 PM
Quote from: Doug Heffernan on January 26, 2022, 11:42:27 AMDo you mean that the 500 error you got was for the whole forum and not just the pages? That is strange, there is nothing in the code that would cause that. And the 500 errors is more of a server issue. Anyways, is there any specific error pertaining to this logged in the error log?
Yes for the whole forum. No errors in admin and it only happens when I change the code in sub_pages.php to what to what you posted...weird! :o

Have you tried the code above to see if it happens to you?

Yes, I did and I could not reproduce that.

Advertisement: