MoonPoint Support Logo

 

Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals



Advanced Search
May
Sun Mon Tue Wed Thu Fri Sat
1
       
2011
Months
May


Sun, May 01, 2011 9:20 pm

Off-Topic BBC Tag Installation

I attempted to again install the Off-Topic BBC Tag mod by (Ha)2. I had previously used an update to the mod provided by JD82, as described at Off-Topic BBC Tag 1.1.2 Installation of SMF 2.0 RC5 to eliminate error messages for the installation associated with the core files, but I was still getting an error message related to its installation for the Bean and Grassland Curve Variation themes on the system. Note: see Re: Off-Topic BBC Tag posting by JD82 on April 19, 2010 03:01:32 PM in regards to the update needed for the mod.

The relevant files are as follows:

ThemeFile
Bean./Themes/Bean/css/index.css
Grassland Curve Variation./Themes/greengrass1/css/index.css

It would show one test for each file being successful, but the other one failing. It would find the following code:

/* The "Quote:" and "Code:" header parts... */ .codeheader, .quoteheader { color: #666; font-size: x-small; font-weight: bold; padding: 0 0.3em; }

It wanted to make an "Add After" modification of adding the following:

/* The "Off-topic:" header part... */ .off-topicheader { color: #696969; text-decoration: none; font-style: normal; font-weight: bold; font-size: xx-small; line-height: 1.1em; }

For the other "Add After" modification it wanted to make, it was looking for the following:

/* A quote, perhaps from another post. */ blockquote.bbc_standard_quote, blockquote.bbc_alternate_quote { font-size: x-small; color: #000; line-height: 1.4em; background: url(../images/theme/quote.png) 0.1em 0.1em no-repeat; border-top: 2px solid #99A; border-bottom: 2px solid #99A; padding: 1.1em 1.4em; margin: 0.1em 0 0.3em 0; overflow: auto; }

It wanted to then add the following:

/* Silly users may go off-topic */ .off-topic { color: #444444; background-color: #dadde2; border: 1px dotted #696969; margin: 2px; padding: 2px; font-size: x-small; line-height: 1.2em; }

When I compared the code in the index.css files with what was being sought, I found that the only difference was in the border-top and border-bottom solid color values. The installation process was expecting to find #99A, but other values were actually present for the two themes. I edited the index.css file for each theme to replace the solid color values with the ones that were expected. I then went to the Browse Packages page again and clicked on the Install link for the package. This time, I didn't see any error messages for the themes and installed the package checking the option to install for the two themes as well. After I had installed the package, I put the color values back to what they had been for the themes.

E.g., for the Grassland Curve Variation theme, the relevant section of code was as follows:

/* A quote, perhaps from another post. */
blockquote.bbc_standard_quote, blockquote.bbc_alternate_quote
{
        font-size: x-small;
        color: #000;
        line-height: 1.4em;
        background: url(../images/theme/quote.png) 0.1em 0.1em no-repeat;
        border-top: 2px solid #267F00;
        border-bottom: 2px solid #267F00;
        padding: 1.1em 1.4em;
        margin: 0.1em 0 0.3em 0;
        overflow: auto;
}
ThemeFileActual ColorExpected Color
Bean./Themes/Bean/css/index.css#000#99A
Grassland Curve Variation./Themes/greengrass1/css/index.css#267F00#99A

Note: When you start the installation process and get to the point where you see the error messages for particular files, you can find the changes that will be made by checking package-info.xml. Look in the install for= sections for the relevant entry related to the version of SMF you are using. In this case the file referenced was off-topic_2_0_curve.xml. Then look for search position= sections to see what code the installation process is searching for in various files.

[/network/web/forums/smf] permanent link

Sun, May 01, 2011 6:29 pm

Emulating a Prior SMF Version

Sometimes, when you are trying to install a Simple Machines Forum (SMF) forum package, the installation fails because the installation process is looking for a specific version or versions of SMF. A zip file you download for a mod has a package-info.xml file within it. That file may specify that the installation is valid for specific versions of SMF. For instance a package-info.xml file might have the following lines within it:

<install for="2.0 Beta 4, 2.0 RC1, 2.0 RC1-1, 2.0 RC1.2">
   <modification>off-topic_2.0.xml</modification>
....
<install for="1.1 - 1.1.99">
   <modification>off-topic_1.1.x.xml</modification>

So, if the version of SMF on the system is 1.1 to 1.1.99, then the installation process will use the off-topic_1.1.x.xml file contained within the zip file. If the version of SMF is one of the 2.x versions listed, then the installation process will use off-topic_2.0.xml. But if you have SMF 2.0 RC5, it doesn't know how to install the mod. In this case, you could emulate 2.0 RC1.2 and, hopefully, still install the mod.

To emulate a prior version of SMF, click on the Advanced link you will see at the bottom of the page displayed when you go to Browse Packages. You will see an emulate version field. Put in a version number that the package is expecting, e.g., if the version of SMF on the systems is SMF 2.0 RC5, I may still be able to install a package that was written to work with versions up to 2.0 RC1.2 by putting SMF 2.0 RC1.2 in that field and clicking on Apply. After the installation completes, go back and click on the Revert link under Advanced on the Browse Packages page or put in the actual version and then click on Apply. When you do so, you may no longer see an Uninstall option next to the package name; to uninstall the package, you would have to emulate the prior version again.

If a mod, aka package, is looking for an earlier version of SMF than what you have on the system, then you also don't see an Install option listed next to the package, if you haven't yet installed the package. All you see are the List Files and Delete options next to the package name.

[/network/web/forums/smf] permanent link

Sun, May 01, 2011 1:45 pm

Reply Button in All Posts

When trying to install the Reply Button in All Posts, also named "Reply Button In Every Post" by its author, mod I encountered an error when I tried to install the mod on a Simple Machines Forum (SMF) 2.0 RC5 forum. The installation process couldn't find code it was looking for in ./Themes/default/Display.template.php. The installation process was looking for two pieces of code, one it found and the other it could not find.

It found the following:

// Can they reply? Have they turned on quick reply?

It would perform an "Add Before" for the following code:

// Simple Reply Button if ($context['can_reply'] && !empty($options['display_quick_reply'])) echo ' <li><a href="#quickreply">', $respond_button, '</a></li>'; else echo ' <li><a href="', $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';num_replies=' . $context['num_replies'], '">', $respond_button, '</a></li>';

But that was just a comment that would be added, so would have no bearing on the reply button actually appearing on every post on the forum. To actually get the reply button to appear on every forum posting, so that someone wouldn't have to do a lot of scrolling to reply to a long thread, the installation process needed to find the following code:


      $reply_button = create_button('quote.gif', 'reply_quote', 'quote', 'align="middle"');

That wasn't actually in the file. I looked in the file and couldn't find anything even close to the searched for code.

There is a Support Topic page for the mod and at Topic: Reply Button In Every Post, I fond a posting by gbsothere on September 27, 2010 02:41:33 PM stating that one only need look for "// Can they reply? Have they turned on quick reply?" and then add the following before it:

// How about replying at any point?
if ($context['can_reply'] && !empty($options['display_quick_reply']))
echo '
<li class="reply_button"><a href="', $scripturl, '?action=post;reply=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';num_replies=', $context['num_replies'], '" onclick="doReply(', $message['id'], ');">', $txt['reply'], '</a></li>';

I did so and then a reply button appeared on all posts. I proceeded with the install process on the forum, despite the error message then, just so the mod would show up in the list of installed mods.

[/network/web/forums/smf] permanent link

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo