MoonPoint Support Logo

 


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



Advanced Search
June
Sun Mon Tue Wed Thu Fri Sat
     
   
2011
Months
Jun


Fri, Jun 24, 2011 9:45 pm

Editing Settings.php to take SMF forum out of maintenance mode

When I logged into a Simple Machines Forum (SMF) forum, I saw the message below:

Maintenance Mode

Okay faithful users...we're attempting to restore an older backup of the database...news will be posted once we're back!

I needed to take it out of maintenance mode, but at Settings.php file, I saw the following:

$maintenance



Sets whether the Forum is in maintenance mode or not.
Value    Description
0    Maintainance mode off. The Forum can be used normally.
1    Maintainance mode on. Only administrators can use the Forum as usual. Other users get a 'this Forum is in maintenance mode' message. The database may still be accessed for user authentication (so as to tell if the Member is an administrator.)
2    Maintainance mode on, full force. Freezes the forum. No one can access it, not even administrators. This setting will leave the database untouched (as far as the SMF Forum is concerned) but cannot be set from the administration center. This setting is used by SMF's upgrade tool to ensure an undisturbed upgrade.

I looked at the Settings.php file in the dorum directory for SMF and saw the following:

########## Maintenance ##########
# Note: If $maintenance is set to 2, the forum will be unusable!  Change it to 
0 to fix it.
$maintenance = 2;               # Set to 1 to enable Maintenance Mode, 2 to 
make the forum untouchable. (you'll have to make it 0 again manually!)

When I changed the value for maintenance from 2 to 0, I was able to access the forum again.

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

Tue, Jun 21, 2011 11:32 pm

Installing TinyPortal 1.0 RC2 on SMF 2.0

When I attempted to install TinyPortal 1.0 RC2 on an SMF 2.0 Gold forum, the installation process showed one of the six installation tests for ./Sources/Subs.php failing. The one that failed was the following:

Code: (Find)

'calendar' => array(

Code: (Add Before)

'tpadmin' => array(
'title' => 'TinyPortal',
'href' => $scripturl . '?action=tpadmin',
'show' => TPcheckAdminAreas(),
'sub_buttons' => array(
),
),
'calendar' => array(

When I edited ./Sources/Subs.php, I saw the searched for code was in the file. When I used a hexadecimal editor to examine the file, I saw the following in Sources/Subs.php:


)  ,  LF TAB '  c  a  l  e  n  d  a  r  '     =  >     a  r  r  a  y  (  LF LF TAB TAB TAB TAB  '
29 2C 0A 09  27 63 61 6C 65 6E 64 61 72 27 20 3D 3E 20 61 72 72 61 79	28 0A 0A 09  09  09  09   27

Note: hex 09 represents the "tab" character

I looked at the package-info.xml file that was inside the zip file for installing TinyPortal, I found that the installation process uses the SMF2/tinyportal200.mod file to determine what files to change during the installation. Note: when you start the installation process with the SMF Package Manager, when you get to the point where the installation process tells you whether installation tests have failed or succeeded, you can find the extracted files from the zip file you are installing in Packages/temp. The temp directory and its files will be deleted after the installion is completed.

That file instructs the installation process to look for the following:

00000FB0   3C 73 65 61  72 63 68 20  66 6F 72 3E  0D 0A 09 09  <search for>....
00000FC0   09 27 63 61  6C 65 6E 64  61 72 27 20  3D 3E 20 61  .'calendar' => a
00000FD0   72 72 61 79  28 0D 0A 3C  2F 73 65 61  72 63 68 20  rray(..</search

I.e., the installation process looks for a CR, LF, then 3 tab characters then 'calendar' => array(. After the "(", the installation process looks for a carriage return (CR), represented by hex 0D, character followed by a new line, aka line feed (LF) character represented by hexadecimal 0A - see ASCII Table and Description. represented by hexadecimal 0A.

The system on which I was installing TinyPortal was a Linux system. Linux, Mac OS X, and Microsoft Windows systems use different conventions for marking the end of a line - see OS X Line Endings for a discussion of the differences.

So the TinyPortal developers appear to be expecting the software to be installed on a Windows system or did their development on a Windows system. Thus the presence of the CRL LF in the SMF2/tinyportal200.mod . But, the code actually present in the Subs.php file was what one normally finds for line endings on a Linux system, i.e., a LF character, though actually two LF characters, one after the other in this case.

Looking at previously installed packages on the system, I saw that one, Tagging System for Topics 2.4.2 had modified Subs.php. I could see by going to the webpage for the module on the SMF site and clicking on the Parse button with 2.0 selected for Manual Install Instructions for SMF that code near the 'calendar' => array line had been modified.

Find: [Select]
'calendar' => array(

Replace With: [Select]

			'tags' => array(				                                
                                'title' => $txt['smftags_menu'],
                                'href' => $scripturl . '?action=tags',
                                'show' => true,
                                'sub_buttons' => array(	
                                ),
                        ),
       	'calendar' => array(

I thought I might uninstall it to see whether TinyPortal would install without error, but when I tried uninstalling it, I saw errors for other files for the uninstall tests. I saw errors for the following files:

./Sources/ManagePermissions.php
./Sources/Display.php
./Sources/Admin.php

The installation of other packages must have modified code the uninstall process for Tagging System For Topics was expecting to find. So I didn't uninstall it.

Instead, I dealt with the problem by editing Subs.php with the Freeware Hex Editor XVI32. I transferred the file to a Windows system and edited it there adding the extra tabs and making the file match what the installation process expected using XVI32, then transferred the file back to the Linux system. When I then retried the install, I didn't see any error messages.

References:

  1. TinyPortal
    SMF Customization - Simple Marchines
  2. TinyPortal Support - Developer's site
  3. ASCII Table and Description
  4. OS X Line Endings
    Date: March 2, 2010
    MoonPoint Support

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

Sun, Jun 19, 2011 1:59 pm

Installing Enhanced About Page 0.01 on an SMF 2.0 Forum

When I attempted to install version 0.01 of the Enhanced About Page package on a Simple Machines Forum (SMF) with SMF 2.0 Gold installed, I had to first configure the SMF Package Manager to emulate SMF 2.0 RC5, since that is the last version for which the installation file, package-info.xml, expects. When you select Browse Packages, you will find an Advanced link at the bottom of the page. If you click on that link you can put SMF 2.0 RC5 in the Emulate Version field. Click on Apply to use the new value. After the package is installed, you can click on the Revert link underneath Emulate Version to set the version back to the actual installed version of SMF. Click on Apply again.

But I also encountered another problem while installing the Enhanced About Page module. The install process couldn't find the code it was looking for in the index.php file for the forum.

Code: (Find)

'who' => array('Who.php', 'Who'),

Code: (Replace)

'who' => array('Who.php', 'Who'),
'about' => array('EnhancedAboutPage.php','EnhancedAboutPage'),

The install process was indicating it couldn't find the code it was looking for, 'who' => array('Who.php', 'Who'),. If it found that code, it would add the following on a line beneath it:

'about' => array('EnhancedAboutPage.php','EnhancedAboutPage'),

When I looked at the code in index.php, I found 'who' => array('Who.php', 'Who'), in the file. I had to examine index.php and install2.xml with a hexadecimal editor to discern the cause of the problem, which was due to two tab characters appearing at the end of the relevant line in the index.php file that the installation procedure for Enhanced About Page was not expecting.

Within a zip file for a package, there is an package-info.xml file that tells the SMF install process what versions of SMF are supported by the package and which install files to use for particular versions of the forum software. In this case package-info.xml had a line indicating that install2.xml is to be used for installing Enhanced About Page on an SMF 2.0 forum.

When I examined the code in install2.xml, I found it was instructing SMF's install process to look for the line above, but telling the process that immediately after the ), at the end of the 'who' => array('Who.php', 'Who'), it should find a linefeed character, i.e., the hexadecimal character 0A (see Ascii Table for a table that shows the hexadecimal codes associated with ASCII characters). But when I examined index.php with a hexadecimal editor, I found that there were two tab characters (hex 09) after the ), at the end of the line. The tab characters were followed by a linefeed (LF) character, i.e., a hexadecimal 0A character.

index.php

(  '  W  h  o  .  p  h  p  '  ,     '  W  h  o  '  )  ,  tab tab LF
28 27 57 68 6F 2E 70 68 70 27 2C 20 27 57 68 6F 27 29 2c 09  09  0A

In the index.php file, I deleted everything after the ), at the end of the line, so that the line terminated immediately after those characters. When I retried the installation for the Enhanced About Page, it then completed successfully with no errors reported for any file.

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

Fri, Jun 17, 2011 4:22 pm

Switching from 1 line for entries to 2 lines in Quicken 2011

If you prefer a 2-line display for entries in your checking and savings accounts in Quicken 2011 rather than the default 1-line display, you can switch for each account by viewing that account in Quicken and then clicking on the Account Actions dropdown menu and selecting Two-line Display, which appears beneath Register Views and Preferences. You can also use Ctrl-2 as a shortcut to toggle between the one-line and two-line displays. If you are in 1-line display mode, Ctrl-2 will switch you to 2-line display mode for entries and if you are in 2-line display mode, Ctrl-2 will switch you to 1-line display mode for entries in your accounts.

References:

  1. register: how to change from 1 line view to 2 line view
    Date: June 2, 2011
    BeanSmart.com - accounting ideas exchange

[/os/windows/software/financial] permanent link

Once You Know, You Newegg AliExpress by Alibaba.com

Shop Amazon Local - Subscribe to Deals in Your Neighborhood

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo