I ran into a stupid problem, by changing the settings for permalinks to a Wordpress (switching the classic PHP request to URL SEO) i get a “404 error page not found”. After checking that my apache to have the mod_rewrite enabled and .htaccess file was been created by Wordpress itself, i tried to investigate into the configuration of Apache.
Actually the configuration of the root directory report the value:
AllowOverride None
changed in:
AllowOverride All
The problem was solved, but have wasted me lot of time …
Today, services like Twitter impose the use of short URL, certainly in the network there are several free services, but if we want something we can use custom Wordpress to create a dedicated service to our blog. The trick is to exploit the demand for each item, calling for his ID stored in the database.
In part we can put this piece of HTML code to display a link to “short”.
<?php echo get_bloginfo('url')."/?p=".$post->ID; ?>
Google Buzz is now on everyone’s lips for being anti Facebook situation. It’s time to exploit this situation to your blog, because the service is heavily oriented social network. Technically Google Buzz is largely integrated into Google Reader, the aggregator of RSS feeds, so we can exploit this relationship to create an appropriate button. You only have to make sure that in your profile Buzz (above under the heading “connected sites”) has been added to Google Reader.
Obviously we must have a basic knowledge of PHP and Wordpress system, but simply add a few lines in the right place, through the WordPress editor (in the Appearance -> Editor).
Here’s the code:
1
2
| <a rel=”nofollow” target=”_blank” href=”http://www.google.com/reader/link?url=<?php echo get_permalink() ?>&title=<?php the_title();?>&snippet=<?php the_excerpt(); ?>&srcURL=<?php echo get_settings(‘home’); ?>” Title=”Share this via Google Buzz><img="<?php echo bloginfo('template_url');">/images/buzz-icon2.gif"/>
</a> Google Buzz |
Also looking between the various utilities proposed in Google Reader you can add a small clip (bottom of the page under “Add a clip”) to your site, where “share” show your Buzz’s.
One of the nice features that the Ajax has brought with it, is surely the autosave. When we write a new article, a special javascript allows you to save, within a specified timeframe, the draft we have produced. For example we are writing and you lose connection, or for majeure force you must dedicate ourselves to something else, without this handy feature we will be with the “old” time-out page and we will have to rewrite everything from scratch. Despite its usefulness, however, there may have needs for which this function is counterproductive.
The developers of Wordpress have a far-sighted thinking to specific functions of “changing the classification” of some PHP classes. So to disable autosaving you must add a specific function in the file functions.php present among the files of your theme.
1
2
3
4
| function disableAutoSave()(wp_deregister_script
('autosave');)
add_action( 'wp_print_scripts', 'disableAutoSave'); |
Function wp_deregister precisely intercept the script and disable autosave. If we want to rehabilitate the function we need to delete the lines above.
From version 2.9 of WordPress you have a Recycle Bin for articles. Definitely a step forward that brings in the dimension of the Wordpress as CMS. Trash is emptied automatically every 30 days, but if you want change this you can do a little touch to the wp-config.php file present in your web root.
Add the line:
define( 'EMPTY_TRASH_DAYS', 15 );
where the value 15 are the days that pass from the time when an article ends up in the trash when it is finally eliminated.
And if we want to completely disable the trash? We do this by inserting the value zero
It may be useful to make a backup of a specific database through the command line. Surely it is easier to use tools like phpMyAdmin, but in case of emergency or because you prefer use the shell, this info is certainly useful. The executable that performs the operation is “mysqldump” which is usually installed with the MySQL server.
mysqldump -h localhost -u username -p database_name > database_backup.sql
Obviously the parameters changed accordingly, localhost should be fine considering the use of the shell, while database_name username must be adjusted accordingly. After the sign > is the name chosen at your discretion. Once given the command will be prompted for a password to access the database to its content.
Can also directly produce a compressed slightly by changing the syntax as follows:
mysqldump -h localhost -u username -p database_name | gzip -9 > database_backup.sql.gz
where performs gzip compression (-9 parameter indicates the best compression possible), this is useful if you download the file through the Internet.
If you have a version of “old” Checkpoint, from R71 and before, with a license Extender SSL (clientless VPN over port 443) certainly will not work under Windows Vista and Windows 7. The Java client (or ActiveX) will return an error “failed to load”. The problem has been confirmed by Checkpoint itself.
The solution for the new Windows operating systems (excluding XP family) is to download a small application called SNEX that actually goes to update that installed from the web page SSL extender.
However is possible (obviously for the sys-admin that manages the property Checkpoint) to update the client SNEX the webserver Checkpoint as documented in this page.
21 Dec, 2009
Posted by: admin In: Google
With version 4 of Google Chrome browser has added a feature that is rather interesting called pin tab. Essentially a tab is iconified as recently seen in videos from Google ChromeOS. This feature is interesting if you want to leave some tabs dormant, such as Gmail. To do so, right-click with your mouse over a tab, and then choose”Pin Tab“.
Unfortunately at the time of writing, the beta version 4.0.249, after you close your browser, reopening the tab fixed there is no trace.
To overcome this problem, make a small change to the link that launches the browser. For example, the Google Chrome on the desktop, just right-click with your mouse, then click Properties. Now in text form called target (ie, the first from top) should look like this:
C: \Users\user\AppData\Local\Google\Chrome\Application\chrome.exe
You just need to add the parameter --pinned-tab-count=x where x is the number of tabs that you want to be fixed at each new opening of browser, followed by the url separated by a single space.
For example if you want to open gmail and reader Add at the end of chrome.exe
--Pinned-tab-count=2 https://mail.google.com/mail http://www.google.com/reader/view/
Launch your browser made in Google, and you have the tabs iconificate permeate.
11 Nov, 2009
Posted by: admin In: Windows
Like older Windows Operating system’s, Windows Seven also have own shortcut keys. Here’s the list:
- Windows key + left/right arrow:
pin current active window to left/right of monitor.
- Windows key + Shift + left/right arrow:
move current active window to left/right monitor, if a second monitor is present.
- Windows key + up/down arrow:
maximize (up) or hide (down) the current active window.
- Window key + plus (+) or minus (-):
open the zoom native zoom software.
- Windows key + home:
maximize or hide, all NON active windows from taskbar.
- Windows key + G:
move to top, from desktop, all gadgets.
- Windows key + P:
open the projector software.
- Windows key + Spacebar:
show the desktop until you press the combo.
- Windows key + X:
open the Windows Mobility Center.
- Windows key + 1 (2, 3 etc.)
launch the first (second, etc) program pinned in taskbar.
- Windows key + T:
cycle from all active task in super taskbar mode.
- Ctrl + Shift + click:
launch program in administrator mode.
Today we had the need to “burn” (of course the correct term is “load”) an ISO image on a bootable USB stick. The problem was how to transfer a previously ISO image on a USB key and make it bootable. We found this very interesting project on sourceforge, named UNetbootin.
This small program in Windows version ( installation is not required) and Linux too, allow to create a bootable stick with an single easy step.