28 Desember 2011

BUAT PLUGIN wp-table DI WORDPRESS


My first plugin : wp-Table
For a project I need to show sport results in a table. But my WordPress users create horrible table layouts or damage a existing table with the WordPress WYSIWYG editor. So I search in the web for a simple table editor.
After I didn’t really found a table editor for my purpose , I take the chance to create this plugin by myself, as first study of “creating plugin’s in wordpress”. So if you need a table in your blog and if you not so familiar with HTML table design, you can use the wp-Table Plugin. The latest feature update is a csv import , so that you can edit tables in a much faster way.
This is a simple preview, created with wp-Table :
You only need to enter in your blog the tag : [TABLE=ID]. You easily manage the tables in the admin section under : Manage -> Tables. This is a preview of the above table in the wordpress admin section.
wp-table Admin panel wp-table admin area
You can set up the style for border, cell spacing, background color etc. via global settings or direct in the wp-Table.css style sheet. This file must be in the same folder like the plugin itself.
Installation :
wp-TableCopy all files in the plugin folder “wp-table” . Activate the plugin and start under Manage -> Tables to edit your first table. The plugin creates automatic one sample table in you wordpress database. If you would like to edit online the CSS file, set the write permission for wp-table.css .
Requirement :
Tested it with WordPress Version 2.0.4 (German version) and 2.0.5
Tested with PHP 4.3.7 and higher, MySQL 4.0.15 and 5.0.18
Language :
This plugin support the GNU Gettext localization. It’s prepared for the translation in other languages, to support the plugin in your language , seehere.
Flag: UK English [en_EN]
Default language
Flag: DE German / Deutsch [de_DE]
Always included
Flag: FR French / Français [fr_FR]
Author: Christian
For version: 1.35
Last updated: 2007-02-09
Download wpTable-fr_FR.zip
Flag: PL Polish / Polski [pl_PL]
Author: Maciek Palmowski
For version: 1.41
Last updated: 2007-03-16
Download wpTable-pl_PL.zip
Flag: TR Turkish / Türkçe [tr_TR]
Author: Ehcrea
For version: 1.52
Last updated: 2007-12-18
Download wpTable-tr_TR.zip
Flag: IT Italian / Italiano [it_IT]
Author: RiccardoPro
For version: 1.52
Last updated: 2007-10-09
Download wpTable-it_IT.zip
Flag: BR Portuguese / Brazilian Português [pt_BR]
Author: Fabricio Vieira
For version: 1.52
Last updated: 2007-11-07
Download wpTable-pt_BR.zip
Flag: DK Danish / Dansk [dk_DK]
Author: Strang Skov
For version: 1.52
Last updated: 2007-11-28
Download wpTable-dk_DK.zip
Flag: NL Dutch / Nederlands [nl_NL]
Author: Noe Snaterse
For version: 1.52
Last updated: 2007-12-30
Download wpTable-nl_NL.zip
Flag: BG Bulgarian  [bg_BG]
Author: Alexander DichevFor version: 1.52
Last updated: 2008-01-18
Download wpTable-bg_BG.zip
Just upload the .mo file in the wpTable folder. WordPress will automatically load the language file from this directory, where ‘locale’ is the value you defined in your wp-config.php file in the root of your WordPress installation.
Table Sorting Option : 
A very cool and new feature is the sorting of the columns. Click on the header for a demonstration. I integrated this script as new option, it’s a heavy complex JavaScript from Frequency Decoder and in some cases other scripts (i.e. Prototype.js) causes problems. Please ensure that you are using the latest Prototype version V1.5.0, when you use this together. 
Note :
Thanks to the plugin’s from Thomas Boley (myGallery) and GaMerZ (WP-Polls),
which gives me a lot of education.
History list :
V1.52 / 15.10.2007 - Bugfix for Gengo
V1.51 / 03.10.2007 - Bugfix in CSS (Forgot change from id to class)
V1.50 / 24.09.2007 - Changes for WordPress 2.3
- Changes CSS from id to class
- Minor bugfixes (remove get_settings)
V1.45 / 20.05.2007- Fix path problem in button (forgot one ../)
- Rename to wptable-tinymce.php
V1.44 / 29.04.2007- Fix path problem in button
V1.43 / 25.04.2007- Bugfix for TinyMCE Button
V1.42 / 11.04.2007- Bugfix for copy table
V1.41 / 26.02.2007- New function : Insert row in between
- Bugfix for sql_mode
V1.40 / 17.02.2007- Add TinyMCE button
- Change SQL string type for longer text
- TABLE tag can now lowercase 
- Add Tag [TABLENAME= XXX] (Thanks to William)
- Integrate french translation (Thanks to Christian)
V1.35 / 14.01.2007- Integrate table sorting script from Frequency Decoder
- Change CSS-class structure
- Change table style of CSS file
V1.34 / 12.12.2006- Drop check for content of csv-file
V1.33 / 09.12.2006- Bugfix for Cell padding/spacing
- Bugfix for shown ‘$’ in table
V1.32 / 07.12.2006- Bugfix for Copy table
- Show Mime Type when import a file
V1.31 / 05.12.2006- Table can be copied
- WP-Table.css is editable
- Minor bugfix in delete last column
V1.30 / 03.12.2006- CSV Import
- Bugfix for identical table names
- New table is setable with number of rows
V1.20 / 26.11.2006- wp-Table is now XHTML 1.0 Transitional valid
- Remove table alignment (not XHTML valid)
- Integrated CSS file for more style control
V1.11 / 22.11.2006- Fixed “Show description” problem
- Init serveral variables to avoid a warning from PHP
V1.10 / 20.11.2006- Alignment control for each column
- Border size, cell padding, cell spacing now editable
V1.01 / 19.11.2006- Input values can now contain HTML code or a link
V1.00 / 11.11.2006- Create tables
- Options for header, border and alternating color
- Show table name or description
- Setup table width
- First row can be in bold font
- Included german translation

27 Desember 2011

Number of Users” plus 1 more


Posted: 24 Dec 2011 05:30 PM PST
First of all Merry Christmas and Happy Holidays to everybody. I wish you best holiday season.
In today’s blog post – I am sharing very small question received by one of the reader. Though simple sometime a small question make people think. He sent me very similar to following image and asked few questions. As his image represented his server’s information, I am reproducing very similar image using AdventureWorks database.
Question: What does the number of users signifies in database properties? Does this mean current connected users or total active users or total enabled users or what exactly?”
Answer: Database Properties >> Number of Users indicates the how many users exists in the database.
In my current example you can see that there are 5 users and that is displayed in the above properties screen. Though, it is very simple question, now I am going to ask you question back.
Question to readers: If you notice there is small arrow besides GUEST or SYS login. It is RED arrow on south. What does this arrow means?
Please leave your answer in comments area.
Reference: Pinal Dave (http://blog.SQLAuthority.com)

Journey to SQL Authority with Pinal Dave - SQL SERVER – Fix: Error: 15138 – The database principal owns a schema in the database, and cannot be dropped


Posted: 25 Dec 2011 05:30 PM PST
Last day I had excellent fun asking puzzle on SQL Server Login SQL SERVER – Merry Christmas and Happy Holidays – Database Properties – Number of Users. One of the user sent me email asking urgent question about how to resolve following error. Reader was trying to remove the login from database but every single time he was getting error and was not able to remove the user.
The database principal owns a schema in the database, and cannot be dropped. (Microsoft SQL Server, Error: 15138)
As per him it was very urgent and he was not able to solve the same. I totally understand his situation and here is the quick workaround to the issue. The reason for error is quite clear from the error message as there were schema associated with the user and that needs to be transferred to another user.
Workaround / Resolution / Fix:
Let us assume that user was trying to delete user which is named as ‘pinaladmin’ and it exists in the database ‘AdventureWorks’.
Now run following script with the context of the database where user belongs.
USE AdventureWorks;SELECT s.name
FROM sys.schemas s
WHERE s.principal_id USER_ID('pinaladmin');
In my query I get following two schema as a result.
Now let us run following query where I will take my schema and and alter authorization on schema. In our case we have two schema so we will execute it two times.
ALTER AUTHORIZATION ON SCHEMA::db_denydatareader TO dbo;ALTER AUTHORIZATION ON SCHEMA::db_denydatawriter TO dbo;
Now if you drop the database owner it will not throw any error.
Here is generic script for resolving the error:
SELECT s.name
FROM sys.schemas s
WHERE s.principal_id USER_ID('YourUserID');
Now replace the result name in following script:
ALTER AUTHORIZATION ON SCHEMA::YourSchemaName TO dbo;
Reference: Pinal Dave (http://blog.sqlauthority.com)

22 Desember 2011

Konfigurasi dan Instalasi Nano Station 2 sebagai Wireless Access Point


Prosedur Kerja
  1. Menghubungkan nano station ke komputer menggunakan kabel UTP crossover. IP address default nano station adalah 192.168.1.20. Agar bisa tersambung, IP address komputer harus dibuat satu kelas dengan IP address nano station.

  1. Memulai setting nano station. Setting dilakukan melalui browser dengan mengarahkan browser ke alamat IP default nano station yaitu 192.168.1.20. Setelah itu, memasukkan user name dan password. Username default dan password default nano station adalah ubnt.

  2. Setting pada tab Link Setup.

    - Wireless Mode     = Access Point. Option access point dipilih karena nano station nantinya akan difungsikan sebagai Access Point.
    - SSID            = UBNT-HUKUM_01. SSID merupakan ID dari nano station. ID ini akan terlihat pada list item computer user yang akan memilih access point untuk mengakses internet
    - Channel        = 11 – 2462 MHz. Pemilihan channel harus berbeda dengan channel nano station.
    - Country Code    = Indonesia, Republic of.
    - Output Power    = 26 dBm(maksimum).
    - Data Rate        = 54 Mbps(maksimum).
  3. Menyimpan hasil konfigurasi dengan cara mengklik tombol Change

  4. Setting pada tab Network

    - Network Mode    = Bridge
    - Bridge IP Address    = Static. Option static dipilih agar bisa mengatur IP Address nano station secara manual.
    - IP Address        = 192.168.1.20
    - Netmask        = 255.255.255.0
    - Gateway IP        = 192.168.1.1
    - Primary DNS IP    = 0.0.0.0 (default)
  5. Menyimpan hasil konfigurasi dengan cara mengklik tombol Change

  6. Setting pada tab Advanced

    - Distance        = 35,2 miles (maksimum)
    - Antena Setting    = Adaptive
  7. Menyimpan hasil konfigurasi dengan cara mengklik tombol Change

  8. Setting pada tab Services. Pada Services Setting tidak ada konfigurasi yang diubah.

  9. Setting pada tab System. Pada System Setting tidak ada konfigurasi yang diubah.

  10. Pemasangan nano station. Hal yang penting untuk diperhatikan pada pemasangan Pemasangan nano adalah letak dan posisi nano station yang sinyalnya bisa terpancar secara efektif ke tempat-tempat yang memang memerlukan sinyal Wi-Fi.