Samsarin PHP Widget
If you are not familiar with Wordpress widgets, take a look at Automattic’s Widget plugin. The plugin makes it easy to reconfigure your Wordpress sidebar by dragging and dropping widgets into place on a sidebar menu.
The Samsarin PHP Widget adds a new text widget that allows PHP to be included inline.
Installation
- Download the Samsarin PHP Widget and unzip it.
- Copy samsarin-php-widget.php to the /wp-content/plugins directory.
- Login to your admin console, go to Plugins, and enable the Samsarin PHP Widget.
Recent Changes
- Now hosted at the Wordpress plugin directory. This should allow you to get notifications when the plugin is updated.
- 1.3.2 - Added an option to reset a widget or to reset all widgets
- 1.2 - Increased max # of widgets to 25
- 1.1 - Fixed a widget API incompatibility in Wordpress 2.2
- 1.0 - Initial release
Usage
The Samsarin PHP Widget can be used like the default text widget. In addition, you can add PHP to the Samsarin PHP Widget by enclosing PHP code as follows:
<?php your_code_here... ?>
- In your admin console, go to Presentation, and then go to Sidebar Widgets
- Select the number of PHP Widgets you want in the “Samsarin PHP Widgets” window. By default, 1 will be available.
- Drag one of the Samsarin PHP Widgets to your sidebar.
- Click the window button on the Widget to edit its title and body.
Frequently Asked Questions
What versions of Wordpress are supported?
This plugin has been tested with Wordpress 2.2, 2.3, and 2.5.1.
My Samsarin PHP Widget does not show up in the widget admin console
First, make sure that the plugin is enabled.
- Log in to the admin console
- Go to Plugins
- Verify that “Samsarin PHP Widget” is in the list. If it is not, then wordpress doesn’t see the plugin. Is it in your plugin directory (wp-content/plugins)?
- Verify that the plugin is enabled
If it is enabled and you can see it on the left hand side of the Design | Widgets page, then it is possible that the content of one of the widgets is causing a problem. With Samsarin PHP Widget version 1.3.2 you can reset the widgets.
- Backup your database.
- Go to Settings | Samsarin PHP
- If you know the name of the widget that is not working, use the “Reset” option. If you do not know which widget is failing, use the “Reset All” option. This will reset the widget to its initial, empty state.
Warning
This widget provides great flexibility in customizing your sidebar. It achieves this by automatically evaluating any included PHP included in the title or the body of the widget. Care should be taken when including PHP code in the sidebar, as with anywhere else in the Wordpress system.
License
This Wordpress widget is available to use and redistribute as you wish. If you redistribute this plugin, please include the original copyright and license information. I would be happy to hear how others are using this plugin and I would also appreciate enhancement requests.
March 10th, 2007 at 11:09 pm
[...] numerous requests for the Samsarin PHP Widget, so I am happy to announce that is now available here. This widget makes it easy to add PHP code into the sidebar while using Automattic’s Widget [...]
May 21st, 2007 at 9:05 am
[...] just posted Samsarin PHP Widget 1.1. If you are using Wordpress 2.2, please upgrade to this version. Wordpress 2.2 introduced an [...]
May 28th, 2007 at 2:06 pm
[...] second one was much easier. The Samsarin PHP Widget which has been upgraded for WP 2.2. When I upgraded this blog to WP 2.2 I lost my King Text Widgets [...]
May 29th, 2007 at 3:39 pm
[...] Widgets WordPress widgets - the jewel in the WordPress crown. Widgets remove the need to hack individual files, inserting snippets of code here and there to get extra features and functionality. Before widgets, upgrading your WordPress installation could be a tricky manoeuvre, fraught with danger - you upgraded and lo and behold you lost all those little snippets of code. However, the great thing about Widgets is that not only can you download hundreds of them, you can also take all those little snippets of code and widgetize them. You can create your own “Text Widgets” and use text and JavaScipt inside them. If you want to include PHP code inside of them, then just download the Samsarin PHP Widget. [...]
June 11th, 2007 at 7:26 pm
[...] Samsarin PHP Widget As written, one cannot include PHP calls in a WordPress widget. This plug-in promises to do just that. (tags: blog Plugin php wordpress Widget) [...]
June 30th, 2007 at 6:35 am
[...] Visit [...]
July 2nd, 2007 at 7:37 pm
[...] new version of Samsarin PHP Widget increases the number of widgets available from 9 to 25. [...]
July 7th, 2007 at 3:54 pm
[...] run PHP in widgets, you need a PHP widget plugin, such as this one from Samsarin. To learn more about the parameters you can add to the wp_list_categories template call, see this [...]
July 7th, 2007 at 7:35 pm
[...] Samsarin PHP Widget: I love this! Since I’ve integrated widgets (thank you UP!), this has been a designing timesaver. The writer allowed HTML to be used in the title field as well and this saved me from so many design issues. [...]
July 14th, 2007 at 6:58 am
[...] 2. Samsarin PHP Widget [...]
July 26th, 2007 at 7:41 am
[...] WordPress dispone de un potente sistema de “widgets” (o pluggins) que permiten añadir nuevas funcionalidades a las barras laterales. Si nunca has hecho uno, pero conoces el lenguaje PHP, puedes utilizar un widget de texto compatible con PHP que se encuentra disponible en samsarin blog. [...]
August 3rd, 2007 at 7:26 am
[...] to the (top) contributers of this blog. In order to use this plugin, I recommend you to install the Samsarin PHP Widget in order to be able to include PHP in your [...]
August 4th, 2007 at 6:30 am
[...] The plugin is based on the Samsarin PHP Widget [...]
August 7th, 2007 at 8:52 pm
[...] when I found this plug-in. It allows you to add PHP code to your widgets. It’s called the Samsarin PHP Widget [...]
August 19th, 2007 at 1:20 pm
[...] Samsarin PHP Widget [...]
August 22nd, 2007 at 10:08 am
[...] Samsarin php widget [...]
August 24th, 2007 at 6:50 am
[...] 99) Samsarin PHP Widget [...]
August 24th, 2007 at 2:08 pm
[...] 99) Samsarin PHP Widget [...]
August 25th, 2007 at 1:55 pm
[...] 99) Samsarin PHP Widget [...]
August 27th, 2007 at 6:11 am
[...] 99) Samsarin PHP Widget [...]
September 1st, 2007 at 8:15 am
[...] Visit [...]
September 10th, 2007 at 11:21 am
[...] with a widgetized theme that wants to be able to execute php functions from their widgets. You can download it here. Scroll to the bottom of your widget page after you install and activate the Samsarin PHP Widget [...]
September 12th, 2007 at 9:39 am
[...] Markuz, mi permetto di suggerirti di utilizzare questo plugin. Fammi sapere come è [...]
February 15th, 2008 at 2:36 pm
[...] any issues using PHP includes within a widget. Rogue had the answer: use this WordPress Plugin - Samsarin » Samsarin PHP Widget [POSTED IN] Adult Webmasters Main Forum [LINK] [...]
March 30th, 2008 at 8:09 am
[...] el plugin Sansarin.php el hecho de tener que modificar su plantilla bajo el pretexto que los Widgets no interpretan el [...]
April 28th, 2008 at 7:40 pm
[...] Samsarin PHP Widget 1.2 Works well in Firefox 2. Problems in IE. [...]
May 5th, 2008 at 4:18 am
[...] æ’件地å€ï¼šSamsarin PHP Widget [...]
May 5th, 2008 at 9:34 pm
[...] going to look into hosting options for the Samsarin PHP Widget. If you have any suggestions, I’d be happy to hear [...]
May 16th, 2008 at 11:31 am
[...] run php, plug the search code into it, and move it around like any other widget. I use Samsarin PHP Samsarin PHP Widget ? Samsarin and find it does a nice job. Hope it works this [...]