News:

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

Main Menu

Customizable Home Page

Started by Matthew K., January 28, 2011, 06:52:08 PM

Previous topic - Next topic

Matthew K.

All I can say if it doesn't work is to parse the edits and make sure they were all made.

emmjaibi

#41
Well seems I may have found the problem. I had already installed your great Customizable Home Button mod and looks like that mod and the Customizable Home Page mod didn't parse nicely together although I can't see why the two mods couldn't co exist.

I found this in Subs.php:

   // All the buttons we can possible want and then some, try pulling the final list of buttons from cache first.
   if (($menu_buttons = cache_get_data('menu_buttons-' . implode('_', $user_info['groups']) . '-' . $user_info['language'], $cacheTime)) === null || time() - $cacheTime <= $modSettings['settings_updated'])
   {
      $buttons = array(
         // SMF Modders; Customizable Home Button
         'home' => array(
            'title' => $txt['home'],
            'href' => isset($modSettings['home_button_link']) && !empty($modSettings['home_button_link']) ? $modSettings['home_button_link'] : $scripturl,
            'show' => true,
            'target' => '_blank',
            'sub_buttons' => array(
            ),
            'is_last' => $context['right_to_left'],
         ),

         // Labradoodle-360; Customizable Home Page
         'forum' => array(
            'title' => $txt['forum'],
            'href' => $scripturl. '?action=forum',
            'show' => empty($modSettings['disable_homepage']),
            'sub_buttons' => array(
            ),
         ),
         // End Labradoodle-360; Customizable Home Page
         'forum' => array(
            'title' => $txt['forum'],
            'href' => $scripturl,
            'show' => isset($modSettings['home_button_link']) && !empty($modSettings['home_button_link']) ? true : '',
            'sub_buttons' => array(
            ),
         ),
         // End SMF Modders; Customizable Home Button
         'help' => array(




Same potential problem in Modifications.english.php:

// SMF Modders; Customizable Home Button
$txt['forum'] = 'Forum';
$txt['home_button_link'] = 'Home Button URL<div class="smalltext">E.g. http://www.smfmodders.com/ [nofollow]</div>';
// End SMF Modders; Customizable Home Button

// Labradoodle-360; Customizable Home Page
$txt['forum'] = 'Forum';
$txt['customizable_home_page'] = 'Customizable Home Page';
$txt['customizable_home_page_manage'] = 'Manage Customizable Home Page';
$txt['customizable_home_page_nosettings'] = 'What\'d you do?!?! Just kidding. No settings here. Sorry!';
/* -- Actual Settings -- */
$txt['homepage_browser_title'] = 'Homepage Browser Title:';
$txt['homepage_content'] = 'Page Content:<div class="smalltext">BBC will be parsed.</div>';
$txt['lorem_ipslum'] = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer ligula nunc, mattis a porttitor a, malesuada eu orci. Suspendisse potenti. Vivamus tempor varius elit sit.';
$txt['homepage_header_integrate'] = 'Blend Header and Body:';
$txt['homepage_header_type'] = 'Select Header Type:';
$txt['homepage_body_type'] = 'Select Body Type:';
$txt['disable_homepage'] = 'Disable Home Page:';
$txt['homepage_header_title'] = 'Header Text:';
$txt['disable_homepage_header'] = 'Disable Header:';
/* -- Headers --*/
$txt['general_settings'] = 'General Settings';
$txt['header_settings'] = 'Header Settings';
$txt['body_settings'] = 'Body Settings';
$txt['body_content'] = 'Body Content';
/* -- Labels -- */
$txt['select_catbg'] = 'Category Background';
$txt['select_titlebg'] = 'Title Background';
$txt['select_roundframe'] = 'Roundframe';
$txt['select_windowbg'] = 'Windowbg';
$txt['select_windowbg2'] = 'Windowbg2';
$txt['select_information'] = 'Information';
/* -- Copyright; Please don't remove -- */
$txt['customizable_home_page_copyright'] = 'Customizable Home Page - Matthew Kerle &copy; 2011';
// End Labradoodle-360; Customizable Home Page



How do I make both mods play nicely together? ;D

Matthew K.

$buttons = array(
//-- Labradoodle-360; Customizable Home Button & Page
'website' => array(
'title' => 'Website',
'href' => !empty($modSettings['home_button_link']) ? $modSettings['home_button_link'] : '',
'show' => !empty($modSettings['home_button_link']) ? true : '',
'target' => '_blank',
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
),
'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
),
'forum' => array(
'title' => $txt['forum'],
'href' => $scripturl . '?action=forum',
'show' => empty($modSettings['disable_homepage']) || !empty($modSettings['home_button_link']) ? true : '',
'sub_buttons' => array(
),
),
// End Labradoodle-360; Customizable Home Button & Page --//

emmjaibi

Awesome thank you.  8)

I believe that code would go into the subs.php file.

May I be so bold as to ask what about the modifications.english.php file?

Matthew K.

Yeah...it replaces those similar lines that you posted.

You don't need to make any changes to a language file or I would have specified them.

emmjaibi

I substituted your revised code in Subs.php and what it did do was add a new button 'Website' which goes to my external webpage (previously what 'Home' did) and then repurposed the Home button to go to the Customized Hope Page within SMF so that I had a 'Website', 'Home' and 'Forum' button!

However, clicking on post/topic links, etc. still displayed the Customized Home page and not what it should so the fix didn't fix the major issues (endless links back to the custom home page, settings not being saved/shown in the admin pages, etc.).  :(

Kindred

hmmmm....   So, emulating RC4, the mod installs just fine in 2.0.2

However, the Header Text field in the mod settings does not keep a value.
I type the value into the text box, click save, and it IS applied to the homepage -- but, once I go back to the settings page, the text box for Header Text is blank. If I save it again, the header will be blanked out.

Additionally -- no other mods installed, I get the following errors ---   until I have checked every checkbox, changed every value and saved, then gone back in and made the settings that I actually want.

http://test.turtleshellprod.com/index.php?
8: Undefined index: homepage_body_type
File: /SITE/Themes/default/CustomizableHomePage.template.php
Line: 25

http://test.turtleshellprod.com/index.php?
8: Undefined index: homepage_body_type
File: /SITE/Themes/default/CustomizableHomePage.template.php
Line: 31


24: // Here's our body!
25: if (in_array($modSettings['homepage_body_type'], array(1, 2)))
26: echo '<div class="windowbg', !empty($modSettings['homepage_body_type']) && $modSettings['homepage_body_type'] == 2 ? '2' : '', '">
27: ', empty($modSettings['homepage_header_integrate']) && empty($modSettings['homepage_disable_header']) || !empty($modSettings['homepage_header_integrate']) && !empty($modSettings['disable_homepage_header']) ? '<span class="topslice"><span></span></span>' : '', '
28: <div class="content">', $context['custom_home_page_content'], '</div>
29: <span class="botslice"><span></span></span>
30: </div>';
31: elseif ($modSettings['homepage_body_type'] == 3)
 
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Matthew K.

Wow, I must have written this a while ago. Thank you, Kindred! I'll have to throw out an update for SMF 2.0.2 soon with some new features, hooks, and bugfixes :)

Matthew K.


mithun

Hi

As infn by you i have added here, requesting you to pls pls pls pls help me.

For this mod i used version 2.0 RC4. it has installed successfully and gives blank home page tooo which i want but the internal posts will not work.

Egs: http://technicalmyths.com/index.php [nofollow] [nofollow] is my home page and if i enable the mod then the internal posts technicalmyths.com/index.php?topic=10.0 link will not open.

http://custom.simplemachines.org/mods/index.php?mod=2915

Can u pls help me..

Thank you

Matthew K.

The link will not open? What happens when you click it? Any errors in the error log?

Inti31

#51
Hi!

works also nice in 2.0.2 - just one bug.

When I enter a headertext and save it - it is gone - but shown on homepage
Another thing: when I click on the pencil, the tooltip is in english.

Also the settings text links - this is too much on this - i removed them (set them to = '';

see the german translation and screensot


// Labradoodle-360; Customizable Home Page
$txt['forum'] = 'Forum';
$txt['customizable_home_page'] = 'Variable Homepage';
$txt['customizable_home_page_manage'] = 'Administration: variable Homepage';
$txt['customizable_home_page_nosettings'] = 'Hier gibt es nichts einzustellen!';
/* Saved! */
$txt['homepage_success'] = 'Erfolgreich';
$txt['homepage_settings_saved'] = 'die variable Homepage wurde erfolgreich gespeichert';
/* -- Actual Settings -- */
$txt['homepage_browser_title'] = 'Seitentitel der Homepage:';
$txt['homepage_content'] = 'Seiteninhalt:<div class="smalltext">BBC wird unterst&uuml;tzt.</div>';
$txt['lorem_ipslum'] = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer ligula nunc, mattis a porttitor a, malesuada eu orci. Suspendisse potenti. Vivamus tempor varius elit sit.';
$txt['homepage_header_integrate'] = 'verbinde Kopfzeile mit dem Inhalt:';
$txt['homepage_header_type'] = '&Uuml;berschrift/Kopfzeile:  Typ auswählen:';
$txt['homepage_body_type'] = 'Vorgegebener Body-Class:';
$txt['disable_homepage'] = 'Deaktiviere variable Homepage:';
$txt['homepage_header_title'] = '&Uuml;berschrift (Kopfzeile)';
$txt['disable_homepage_header'] = '&Uuml;berschrift (Kopfzeile) ausblenden';
/* -- Headers --*/
$txt['general_settings'] = '';
$txt['header_settings'] = '';
$txt['body_settings'] = '';
$txt['body_content'] = '';
/* -- Labels -- */
$txt['select_save'] = 'Speichern';
$txt['select_catbg'] = 'Kategorie (Hintergrund)';
$txt['select_titlebg'] = 'Titel (Hintergrund)';
$txt['select_roundframe'] = 'Roundframe';
$txt['select_windowbg'] = 'Windowbg';
$txt['select_windowbg2'] = 'Windowbg2';
$txt['select_information'] = 'Information';
/* -- Copyright; Please don't remove -- */
$txt['customizable_home_page_copyright'] = 'Customizable Home Page - Matthew Kerle &copy; 2011';
// End Labradoodle-360; Customizable Home Page


see testforum: http://inti31.cwsurf.de/_smf1/index.php

shot: that looks better, just my guess

qestion: what ist the category/title background - i don't see anything different? - okay - I found out...

cheers inti31

Ups - another BIG bug - when I want to visit the the forum and want to jump into the standard category (general discussion or Allgemeine Diskussion)
link: http://inti31.cwsurf.de/_smf1/index.php?board=1.0
or in a topic: http://inti31.cwsurf.de/_smf1/index.php?topic=4.msg8#msg8

i jump back to homepage... - so I can't visit forum - too bad - I disabled the custom homepage
my forum
my testforum


my mods - which I only made them work for 2.0 Gold:
Topics Filter v3.2 SMF 2.0 Gold
MemberNumber

bornagainpenguin

Is this mod still being worked on?  I'd like to give it a shot, but it looks to be broken based on the last post...

--bornagainpenguin

Matthew K.

It should work, I'd try it.

bornagainpenguin

Quote from: Labradoodle-360 on June 22, 2012, 05:35:08 PM
It should work, I'd try it.

I'll give it a shot then.  Thanks!

--bornagainpenguin

Matthew K.

Not a problem, let me know how it goes for you.

HunterP

Question for mister Doodle; this mod seems to fit my needs, as I want to add a homepage over my forum but don't need something like a portal, but do like to maintain the SMF-theme / layout.

In the screenshot I see the same menu as in SMF, but I want the menu of the homepage to be different, like :

SMF: HOME - HELP - SEARCH - ADMIN - etc
Homepage: FORUM - NEWS - CONTACT - etc

The same layout, but a different menu in which the first button links to either the forum or the homepage.

Will this be difficult?

Kindred

That would require rewriting the menu function...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

griffinwebnet

i seem to ba having an odd issue here. after enabling it i  set a link in my menu for site.com/index.php?action=forum [nofollow] which works fin to get to the frum but then if i try to get into anyof the boards, it goes to ste.com/index.php/board,2.0.html [nofollow] (<- or the corresponding board number) as it should however this only displays the modified home page and doesnt go to an actual board.

Please advise on how i can correct this issue.

THanks,
WebNet

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: