Regbar Warning

Started by SMFHacks.com Team, August 22, 2006, 06:14:09 PM

Previous topic - Next topic

SMFHacks.com Team

Released 1.0.5
Which fixes support for custom themes in SMF 2.0 thanks to Labradoodle-360


error_2 I looked at the code for modification and it doesn't set an id field for the css that is included.
Disclaimer: SMFHacks.com Team is not affiliated with the SMF Team or the SimpleMachines NPO.
SMFHacks.com -  Paid Modifications for SMF
Latest Mods:
Community Suite
Newsletter Pro SMF Gallery Pro SMF Classifieds SMF Store

Arantor

No, but let me guess, it uses loadTemplate() to load a CSS file?

If that CSS file is in a folder, it will do just that, as I took Labradoodle to task for in his Top X Stats mod. The correct workaround is described there, including why it should be used instead of misusing loadTemplate() for a purpose for which it was not entirely intended.

Matthew K.

The updated edits that I gave vbgamer45 use $context['html_headers'] to load the CSS file rather than loadTemplate(); in addition to fixing the custom theme bug.

SMFHacks.com Team

Yeah just double checked the code looks good for the loadtemplate calls.
    function RegbarWarning()
    {
            global $context, $settings;
            loadLanguage('smfhacks_languages/regbar-warning');
            loadTemplate('smfhacks_templates/regbar-warning');
            $context['html_headers'] .= "\n" . '
           <link rel="stylesheet" type="text/css" href="' . $settings['default_theme_url'] . '/css/smfhacks_css/regbar-warning.css" />
       ';
            $context['insert_after_template'] .= template_regbar_warning();
    }



So error_2  the xhtml validator issue is resolved as well.
Disclaimer: SMFHacks.com Team is not affiliated with the SMF Team or the SimpleMachines NPO.
SMFHacks.com -  Paid Modifications for SMF
Latest Mods:
Community Suite
Newsletter Pro SMF Gallery Pro SMF Classifieds SMF Store

Arantor

Interesting question of the day: do other mods put things into Themes/default/css/smfhacks_css ? If so, do any of them proceed to remove the entire folder on uninstallation?

If so, any setup that uses two different mods with two different CSS files will cause each other to uninstall the entire folder...

Matthew K.

Other modifications utilize the "smfhacks_" directories. If there are other files in the directory from other modifications, the directory is not removed - just the files.

Arantor

Interesting, how's that implemented? Last I checked, SMF had no facilities for that...

EDIT: So I checked. Interesting implementation, though it'd be nice if it checked for permissions when calling unlink(), to avoid errors in the event of permissions changes.

Matthew K.


IMSassafras

Quote from: IMSassafras on December 21, 2012, 09:55:06 PM
I loaded the mod successfully, although, with my theme it doesn't look the best.  I have livecity for my theme and I am running the current version of SMF, 1.1.17.  The mod is aligned to the left and it is not easy to the eye.  My forum is at www.misfitcityforum.com/forum/index.php

I like what this person did to their forum... http://www.atheistroundtable.com  and I like their icon.  If I know what to do and where to go, I am pretty sure I can tweak it. 

________________
Just Me
Sass


Did someone forget about me or is vbgamer45 working on my problem?  Don't mean to be a pest.  Is my issue that unique?

________________
Just Me
Sass
It is not for him to pride himself who loveth his own country, but rather for him who loveth the whole world. The earth is but one country, and mankind its citizens. ~ Bahá'u'lláh
________________________
MisFiT City Forum - Where Attitudes are Nourished and Being a MisFiT is Just Part of the Day!
Say NO to MSG.com - Dedicated to creating public awareness of Monosodium Glutamate and other excitotoxins.

vbgamer45

Your code looks in the wrong place on your site
Quote
<div id="regbar_warning">
         <a href="http://www.misfitcityforum.com/forum/index.php?action=register" target="_self">
            <span class="floatleft" id="regbar_icon">
               <img src="http://www.misfitcityforum.com/forum/Themes/default/images/smfhacks_images/regbar-warning.png" alt="" />
            </span>
            <span class="floatleft" id="regbar_message">
               It appears that you have not registered with <strong>MisFiT City Forum: Discussion, Debate, and Conversation</strong>. To register, please click here...
            </span>
            <br class="clear" />
         </a>
      </div>
Should be after the body tag
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

IMSassafras

Quote from: vbgamer45 on January 26, 2013, 09:14:37 AM
Your code looks in the wrong place on your site
Quote
<div id="regbar_warning">
         <a href="http://www.misfitcityforum.com/forum/index.php?action=register" target="_self">
            <span class="floatleft" id="regbar_icon">
               <img src="http://www.misfitcityforum.com/forum/Themes/default/images/smfhacks_images/regbar-warning.png" alt="" />
            </span>
            <span class="floatleft" id="regbar_message">
               It appears that you have not registered with <strong>MisFiT City Forum: Discussion, Debate, and Conversation</strong>. To register, please click here...
            </span>
            <br class="clear" />
         </a>
      </div>
Should be after the body tag


Ooookkkkkaaaaayyyyy....., But how am I suppose to fix it?  The theme I'm using is LiveCity and it's designed to use the default theme when there isn't another page created to take the place of a default theme page.  It seems to me, the error shouldn't have happened in the first place which makes me think this mod and LiveCity Theme aren't compatible.  But there is always a fix, right?  What do I do?

Thank you very much for the help with this, vbgamer45.  You people are going to make me a charter member yet if you keep this up.  ;)

___________________
Just Me
Sass
It is not for him to pride himself who loveth his own country, but rather for him who loveth the whole world. The earth is but one country, and mankind its citizens. ~ Bahá'u'lláh
________________________
MisFiT City Forum - Where Attitudes are Nourished and Being a MisFiT is Just Part of the Day!
Say NO to MSG.com - Dedicated to creating public awareness of Monosodium Glutamate and other excitotoxins.

Matthew K.

Have you reinstalled this modification, using the latest version?

IMSassafras

Quote from: Labradoodle-360 on January 27, 2013, 02:23:59 PM
Have you reinstalled this modification, using the latest version?

Nope.

I tried to uninstall the old version but I get a white screen with this in the url:

http://www.misfitcityforum.com/forum/index.php?action=packages;sa=uninstall2;package=Regbar-Warning-1.0.4.zip

I'm going to have to manually uninstall, aren't I?  What a headache.  I know, it's not that bad, just time consuming.

__________________
Just Me
Sass
It is not for him to pride himself who loveth his own country, but rather for him who loveth the whole world. The earth is but one country, and mankind its citizens. ~ Bahá'u'lláh
________________________
MisFiT City Forum - Where Attitudes are Nourished and Being a MisFiT is Just Part of the Day!
Say NO to MSG.com - Dedicated to creating public awareness of Monosodium Glutamate and other excitotoxins.

Matthew K.

Could be something with the package, but you may have to manual too.

error_2

Quote from: SMFHacks.com Team on January 21, 2013, 09:16:42 PM
Yeah just double checked the code looks good for the loadtemplate calls.
    function RegbarWarning()
    {
            global $context, $settings;
            loadLanguage('smfhacks_languages/regbar-warning');
            loadTemplate('smfhacks_templates/regbar-warning');
            $context['html_headers'] .= "\n" . '
           <link rel="stylesheet" type="text/css" href="' . $settings['default_theme_url'] . '/css/smfhacks_css/regbar-warning.css" />
       ';
            $context['insert_after_template'] .= template_regbar_warning();
    }



So error_2  the xhtml validator issue is resolved as well.

So the solution to the problem I reported is to uninstall the mod and re-install it?

Matthew K.

The latest version had bug fixes, you should uninstall the last version and install the latest.

error_2

I was using the version 1.0.5.

I checked the mod and it has the same version. So I uninstalled the older version, downloaded it again and re-installed.

It has passed with no error on hxxp:validator.w3.org [nonactive]

Thank you for the mod and your help!

Matthew K.


hawkman

Can I ask a dumb question here?  When I go to the Package Manager -> download packages -> Simple Machines Mod Site

I can't find either this mod.  Why is that?  What am I missing?

Next question is what is the procedure for downloading and installing a mod from the mod page rather than over the package manager?
All that is necessary for evil to prosper is that good men do nothing - Edmund Burke

Arantor

QuoteI can't find either this mod.  Why is that?  What am I missing?

The fact that the team hasn't updated their cache file for the mod site in years.

QuoteNext question is what is the procedure for downloading and installing a mod from the mod page rather than over the package manager?

1. Download the file from the site.
2. Admin > Packages > Download Package
3. Use the bottom item to upload
4. Follow the prompts
5. If it says there are 'errors' of any kind, come back here and ask

Advertisement: