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
   
     
2010
Months
Jun


Sat, Jun 26, 2010 3:44 pm

Redirect Users at Login and Logout to SMF

Note: these instructions were written for Simple Machines Forum (SMF) 1.1.11

To redirect users to a specific webpage that you have created when they login or logout of Simple Machines Forum (SMF), you can use the Redirect on Login and/or Logout mod. Download the RedirectLoginLogout zip file (the latest version as of 2010-06-20 is 0.4), which contains the following files:

package-info.xml
readme.txt
install.xml
install2.xml

To install the package you downloaded, while logged into SMF under an adminisrator account, take the following steps:

  1. Click on the Admin tab.
  2. Under the Main section on the left of the page, click on Packages.
  3. When you see the password prompt, enter the password for the administrator account you are using and then click on the Login button.
  4. Click on the Download Packages tab.
  5. If you downloaded the package to your local system, click on the Browse button under Upload a Package.
  6. Find the zip file of the mod you downloaded and select it, then click on the Upload button. You should see a Package uploaded successfully message with "Redirect on Login and/or Logout mod" listed. That indicates the zip file was placed in the forum's Packages directory on the server.
  7. Now click on the Browse Packages tab. Under Modification Packages, you should see "Redirect on Long and/or Logout mod" listed.
  8. Click on Apply Mod.
  9. If you are prompted for FTP information for the account on the server where you have SMF installed, complete the form with username and password.
  10. If you saw the prompt mentioned in the step above, you may need to click on the Proceed button. If you see "550 Failed to change directory", then the correct directory for SMF couldn't be located. You may need to put in the complete path to the directory where SMF is located, e.g. /home/jdoe/www/hvia/forum. When the mod has been put in the correct location, you should see the Installation Readme displayed.
  11. You now need to install the mod by clicking on the Install Now button beneath Install Actions. You should see a message stating "The package was installed successfully. You should now be able to use whatever functionality it adds or changes; or not be able to use functionality it removes.
Now, to use the mod, log into SMF under an administrator account then take the following steps:

  1. Click on the Admin tab.
  2. Click on Features and Options under Configuration.
  3. Under Basic Features, you should see an Enable Login Redirect section, which will have an "Enter Login URL" and "Enter Logout URL" within it. Enter the URLs for the pages to which you wish to redirect users on Login/Logout and check the Enable Logon Redirect and Enable Logout Redirect boxes as desired.
  4. Click on the Save button.

References:

  1. Download Packages
    SMF Online Manual

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

Mon, Jun 21, 2010 6:10 pm

Finding Large Files on a Windows System from the Command Line

You can find all files over 99 MB in size and store the file names in a text file with the command below:

dir C:\ /a-d/s | findstr "[0-9][0-9][0-9],[0-9].*,[0-9]" | findstr /v "[er](s)" > bigfiles.txt

You can use dir /a-d to select only files and not directories. The /a option means that you want to display files with the specified attributes. Directories are specified by d; specifying a -d means select everything that is not a directory.

The /s option for the dir command indicates that you want to display files in the specified directory and all of its subdirectories.

You can use the findstr command to filter the output of the dir command. If I only wanted to see files that were at least 10 MB or more, I could use findstr "[0-9][0-9],[0-9].*,". To send the output of the dir command to the findstr command, you use the |, which is the pipe symbol, e.g., dir /a-d/s | findstr "[0-9][0-9],[0-9].*,". The information between the double quotes is a "regular expression" that tells the findstr command what to look for in the input it receives. I want it to look for two numbers, followed by a comma, then another number, then zero or more characters and then another comma. The [0-9] tells finstr to look for any character in the numeric set, i.e., 0, 1, 2, 3, 4, 5, 6, 7, 8, or 9. Since I include [0-9] twice, findstr looks for two numbers, one after the other. The dot, ., is used to represent any character and the * following it states the character can occur zero or more times. Then another comma should appear. That command dir /a-d/s | findstr "[0-9][0-9],[0-9].*,", might produce the following output.

C:\Documents and Settings\administrator>dir /a-d/s | findstr "[0-9][0-9],[0-9].*
,"                                                                              
07/30/2002  04:27p          35,417,061 savceclt.exe                             
               5 File(s)     36,390,066 bytes                                   
             217 File(s)     38,486,808 bytes                                   
               0 Dir(s)     469,125,120 bytes free

I don't want the "File(s) and "Dir(s)" lines. I can eliminate them by sending the outpout of the findstr command to another findstr command, i.e., dir /a-d/s | findstr "[0-9][0-9],[0-9].*," | findstr /v "[er](s)". The /v option to findstr tells findstr to display only lines that do not contain a match. In this case, I tell it to look for either an "e" or "r" followed by "(s)" and to discard any lines that match.

:\Documents and Settings\administrator>dir /a-d/s | findstr "[0-9][0-9],[0-9].*
," | findstr /v "[er](s)"                                                       
07/30/2002  04:27p          35,417,061 savceclt.exe

In the case above, I've found all files greater than 10 MB in the administrator's "My Documents" directory or beneath it. If I want to search the entire system for files 100 MB or greater, I could use the following commands:

C:\Documents and Settings\administrator>dir C:\ /a-d/s | findstr "[0-9][0-9][0-9
],[0-9].*,[0-9]" | findstr /v "[er](s)" > bigfiles.txt

Those commands start at the root directory, C:\ and search for all files within that directory or beneath it that are over 99 MB. The >bigfiles.txt redirects the output of the last command to a file named bigfiles.txt.

Examing the bigfiles.txt file, I might see something like the following:

C:\Documents and Settings\administrator>type bigfiles.txt                       
06/21/2010  05:21p         267,948,032 hiberfil.sys                             
06/21/2010  05:21p         314,572,800 pagefile.sys                             
06/09/2010  05:49p         277,297,548 Deleted Items.dbx                        
06/09/2010  05:49p         151,866,224 Inbox.dbx                                
06/09/2010  05:49p         144,463,812 Sent Items.dbx                           
10/27/2009  08:51p         949,861,964 Inbox                                    
06/20/2010  07:48p       1,014,070,855 Sent                                     
03/13/2010  04:42p       2,148,821,701 Inbox                                    
06/21/2010  03:47p         388,459,482 Sent                                     
06/21/2010  05:00p         201,147,392 personal.pst                             
 Directory of C:\Program Files\PhoneTools\vocfiles\WAVMS,11025,8,1              
07/27/2007  09:03a         119,977,472 500dc2a.msp                              
07/27/2007  09:03a         119,977,472 5a34890.msp                              
09/14/2007  01:16p         113,491,064 MAINSP3.CAB

In the case above, there was one line that was included that I didn't actually want just because it did fit the pattern I was looking for, i.e., the WAVMS,11025,8,1 line. But I would expect entries like that to be rare, so I'm not concerned about it in this case.

The directory where the file was found won't be listed, but you can look through bigfiles.txt and then locate particular files listed in it and then make the current directory the root directory with cd \ and then search all subdirectories for the file name as in the example below:

C:\Documents and Settings\administrator>cd \                                    
                                                                                
C:\>dir /s 500dc2a.msp                                                          
 Volume in drive C has no label.                                                
 Volume Serial Number is F4D7-D263
                                                                                
 Directory of C:\WINDOWS\Installer                                              
                                                                                
07/27/2007  09:03a         119,977,472 500dc2a.msp                              
               1 File(s)    119,977,472 bytes                                   
                                                                                
     Total Files Listed:                                                        
               1 File(s)    119,977,472 bytes                                   
               0 Dir(s)     471,283,200 bytes free

[/os/windows/commands] permanent link

Sun, Jun 20, 2010 4:46 pm

SMF Packages Directory or One of the Files Not Writable

If you get the error message below when attempting to install a package under Simple Machines Forum (SMF), create a temp directory beneath the Packages directory and then change its permissions so that it is world writable. Then try installing the package again. I had the problem occur after I deleted a package. I got the error message when I tried installing the package after deleting it.

$ cd forum/Packages
$ mkdir temp
$ chmod 777 temp

The Packages/temp directory is where packages to be installed are unzipped.

References:

  1. Packages directory or one of the files in it are not writable!
    Date: October 5, 2008
    Simple Machines Forum

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

Sat, Jun 19, 2010 10:18 pm

SMF Login and Registration Integration

If you want to have a login and regisration option on the main page for your website and would like to integrate the login and regisration with the Simple Machines Forum (SMF) login and registration rather than force users to login to SMF and other parts of the site separately, you can use http://example.com/forum/index.php?action=login where example.com is the name of the server where you are running SMF. You specify the location of the index.php file, e.g., /forum/index.php, if it is located in a directory named forum beneath the root directory for the web site.

If you just want to have a page where they see nothing but a username and password prompt with a button to click on, you could create a file named login.php with the following code within it:


<html>

<head>
<title>Login</title>
</head>

<body>

<?php

include_once('forum/SSI.php');
ssi_login();

?>

</body>
</html>

Note: the include_once function must be given the location of the SMF SSI.php file, e.g., forum/SSI.php, if it was located in a directory named forum beneath the root directory of the website.

That would display the following on a page:

 
 

You must not be logged into SMF when you attempt to access login.php, otherwise the login and password prompts won't be displayed when you access login.php.

If you wanted to have a register link on the main page for your site that would take someone to the SMF registration form, you could use <a href="http://example.com/forum/index.php?action=register">Register</a> for a registration link on the page. a link.

If you don't want to allow anyone access to any area of SMF without the person first logging in, e.g., you want them to see a login page if they use http://example.com/forum, then you need to deny all guest access to the forum. You can do so by logging into the administrator account for the forum, then clicking on the admin tab, then click on Features and Options under Configuration, then uncheck Allow guests to browse the forum, then click on the Save button.

References

  1. Site Home Page/SMF Login Integration?
    Date: April 20, 2008
    Simple Machines Forum
  2. How To: Get SMF SSI.php Stuff to Display on your Wordpress Blog
    Date: August 21, 2008
    Simple Machines Forum

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

Tue, Jun 15, 2010 7:30 am

Leave Me Bee & Stop Bugging Me!

If a wasp or bee gets into the house, reach for the hair spray. Most insect sprays only infuriate them, but the hair spray stiffens their wings, immobilizing them immediately. This works on all winged insects.

If one happens to escape and sting you, apply a poultice of baking soda and water. Or, try applying a fresh cut slice of raw onion to the sting to help draw out the poison. Hold the onion in place with tape.

A great substitute for insect repellent is white vinegar. Apply it liberally to the skin with a cotton ball. Bugs hate the way you taste and the smell of vinegar disappears once it dries. Great for kids!

To prevent ants from coming in the house or getting into cupboards, sprinkle dried mint or red pepper where they are entering the house and in the cupboards.

Source: Mary Ellen's Best of Helpful Hints

I know the hair spray trick works. Just don't do what a friend who used that trick did after a wasp was brought to the ground after being sprayed; he then picked up the wasp with a tissue and got stung on his hand through the tissue. The spray keeps a bee or wasp from flying, but not from stinging. My wife, who observed, the incident, said he had a dumbfounded look on his face when he got stung, as if he couldn't believe he had just been stung. He was only half awake when it happened and commented "Well, I'm f---ing awake now."

[/info/tips] permanent link

Sun, Jun 13, 2010 5:14 pm

Winamp Crashing When Adding Smart View

Whenever my wife tried choosing a preset, such as "Audio by Genre" to organize her music in Winamp, Winamp 5.572 would crash. She would right-click on Local Media, select Add Smart View and then select a preset for "choose a preset", which would cause Winamp to immediately crash. I found a solution at Media Library problems and crash. The solution was to clear the media library even though she didn't have anything in the library.

The solution posted by ScottVickery there is listed below:

One more clue lending credence to this being a problem with a corrupt library. I cleared the Media Library (Winamp Preferences / Media Library / Local Media - Clear Media Library button), then rescanned (Winamp Preferences / Media Library / Local Media / Watch Folders tab - Rescan now button), and, I can again view my Local Media Audio node in the tree.

Clearing the media library doesn't delete the music files from the PC, it just removes them from Winampls media library. In my wife's case, she didn't have any watch folders.

[/os/windows/software/audio/winamp] permanent link

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo