Blog

WordPress Widget: King Text (+php) (+html)

"Another Text Widget? Why the hell would i need that?"

Well read on and it might convince you.

Features

wordpress widgets king text

Version 0.69 NEW Features 

– Randomize Widget Content. Split the content with the <!–more–> Tag and it will shuffle the text or php code inside.

– Remote Version checking

– Option for using the Javascript Slide Open/Close function

– Where NOT to show. Select Side Area where the widget is not be shown on (i.e. everywhere but Home) this can be combined with the show in category

– changed the license type

Version 0.63

– 20 Text Boxes

– set HTML before/after seperatly for each Widget OR takes widget before/after HTML from functions.php if left empty 

– Menu in which Website Area to show the Widget on.  New Options are:

  • show on Home / Search / Archive or 404 page
  • show on all or special single Page. You can set the id or slug of the Page where to show
  • show on all or special single Article You can set the id or slug of the Article where to show
  • show on all or special Category Listing You can set the id of the Category where to show
  • Show if inside a special Category.  If in list List or on single Article

You find all Options explained in the WordPress Codex in Conditional Tags  make sure to definitly read this if you are using those Options!

– new ajax menu

Version 0.5

– Choose whether to have php or just html in the widget. With php in the widget you can for example use any WordPress call. So if you are missing any WordPress or Plugin functions in widgets insert them there.

– choose in which category the widget shall appear

– 4 html fields to custmize html before/after widget and title 

– based on the king widget framework 

– Fully localizable with gettext Translation (German Translation included)

 

Screenshot

German and English Admin Screens (Version 0.6+  foldable menu, updated screens are comming)

King Text Admin Screen Englisch  King Text Admin Screen German

 

 Comming Features

– Randomly show box Content devided by <!–more–> Tag like in AdRotator. so you also rotate php code or anything else

– Option to show widget to a specific Role -> use wordpress capabilities (I will give this a priority if someone asks/pays for it)
–  set initial JS Open or Close State + JS Open/Close Time
– make use of is_home / is_single or other conditional tags -> what do you think?

– What else would you like to see? Please comment!  

 

Install

Of course you should have wordpress widgets installed and activated. If not, you can find the download and install instructions over at automattic.com

– Copy king_text.php into your plugins widget folder -> where your widgets.php is !!!

– Copy the King Widget Framework in /king-includes into /plugins if you have not already another King Widget installed

– activate in Pluginarea.

– Drag the King Text Widget on one of your sidebars and play with the options. 

Usage 

Show Content Randomly

– insert the <!–more–> tag between you text or php content

Use JS Slide Open/Close

– Hint: When used together with Random Content the Javascript does not instantly recognize the new height of the box. After toggling it the height is ok.  

Here are the steps to be taken. If you don´t understand those you can simply forget about this function

1. Go into the new King Framework Options Panel and activate the  "Insert Sliding Javascript to Head"

2. go to the text widget html options and activate "Use Sliding Box"

3. The difficult part:

You have to fill the custom html options fields(or use this inside the textbox). The Box needs to be wrapped in a collappsible elemet(div/li/p) with aspecial ID and you have to give the click event to some element. Since this can vary with your blogtemplate i left this up to you.

Standart Options which should work with the default Template: (please check the " when copy/paste)

HTML Before Widget: <li>

HTML before widget Title: <h2 onClick="textslide1.toggle();" ><li>

HTML after widget Title: </h2><div id="text1">

HTML after widget: </div></li>

When you have multiple Boxes you just have to adapt the numbers in textslide1.toggle -> textslide2.toggle and of course the id text1 -> text2 

Upgrade

For Version 0.69 you also need to get the changed King Widget Framework which is now available separate.

After upgrading your framework just replace king-test.php with the new one. Your textboxes content should remain unchanged.

Download

Version 0.69

 king-text_0.69.zip king-text_0.69.zip (05.07.2006 01:13)

don´t forget to get the king-widget framework Version 0.68 or greater.

Version 0.63 

king-text_0.63.zip king-text_0.63.zip (09.05.2006 16:13)

 

Please don´t hesitate to give me a feedback if this is usefull or if you think you found a bug!

Have fun! 

Georg Leciejewski

89 Comments to WordPress Widget: King Text (+php) (+html)

  1. 15.02.2009 at 23:19

    Vielen Dank Schorsch, klappt jetzt wunderbar. PolitiKARS

  2. 18.11.2008 at 2:56

    I solved the Fatal Error problem by commenting out Line 24 include_once(‚widgets.php‘);
    Hope this helps

  3. 01.11.2008 at 23:48

    Thanks..

  4. 15.10.2008 at 15:16

    Kleiner Tipp an die CSSler unter uns: Spätestens jetzt ist der Zeitpunkt, das praktische auto-clearing floats zu erneuern

  5. 31.08.2008 at 17:19

    thanks admin.

  6. 28.08.2008 at 19:45

    […] Yes, another Text Widget. This one accepts PHP code and can be assigned to specific categories so it doesn’t have to always show up on the page. […]

  7. hudais's Gravatar hudais
    22.01.2008 at 17:05

    ich bin begeistert von deine idee wann würdest du eine neue version herausbringen.
    vielendank und liebe grüsse aus der türkei.

  8. Jan Bosman's Gravatar Jan Bosman
    23.10.2007 at 22:08

    I fixed the problem (in comment 108) by deleting line 25 of the king-text.php file. Including widgets.php is redundant in WordPress 2.2+

  9. 19.07.2007 at 18:26

    Kleiner Tipp an die CSSler unter uns: Spätestens jetzt ist der Zeitpunkt, das praktische auto-clearing floats zu erneuern. inline-block is the new-and-improved method for auto-clearing floats.” Use it to replace display: inline-table;.) …Quelle

  10. weimingqing's Gravatar weimingqing
    07.07.2007 at 11:30

    Hi, I got a problem when using King Text. I have already actived the widget and King Framework. When I try to active King Text (it’s in the ../plugins/widgets/), it turns out warning message:

    Warning: Invalid argument supplied for foreach() in E:\My Home\xampplite\htdocs\blog\wp-admin\widgets.php on line 30

    Warning: Invalid argument supplied for foreach() in E:\My Home\xampplite\htdocs\blog\wp-admin\widgets.php on line 36

    And after that, it turns out fatal error:

    Fatal error: Call to undefined function wp_get_current_user() in E:\My Home\xampplite\htdocs\blog\wp-includes\capabilities.php on line 446

    BTW, I install wordpress on my local machine.

    Any help about this problem? Thanks!

  11. 12.06.2007 at 2:00

    Resizable columns : Très bonne idée !
    Vous gardez plusieurs longueurs d’avance sur tous vos „concurrents“ (j’ai essayé pageflakes, et les versions de google et microsoft) !

  12. 07.06.2007 at 18:19

    Hi King-Georg,
    First, let me thank you for your plugins. I’ve been using several of them and they delivered, and greatly. Until now…
    I have the same issue than many other players here:
    WP 2.2 does not like your framework!
    So, I’ve seen you haven’t left any replies yet, I guess you are working on it.
    Anyway, could you please tell us if you plan to upgrade you Kings Plugins, or if we should start looking for some other solution?
    Thanks,
    Diego
    http://www.secretia.com

  13. Cibele's Gravatar Cibele
    05.06.2007 at 8:04

    I’ve finally gotten this plugin but it’s not working on the currently WP version (2.2)
    Plz, plz, plz fix it soon :) It’s all i’ve been searching for!
    Thanx.

  14. 02.06.2007 at 20:36

    thankssCrap! I just upgraded to WP 2.2 and didn’t check first to see if these plugins would work. I hope the author (or someone) gets a fix in soon, because I really don’t want to downgrade and run an old & vulnerable version of WP.

    That’ll teach me to upgrade without checking the plugins first! :)

  15. 31.05.2007 at 8:21

    Crap! I just upgraded to WP 2.2 and didn’t check first to see if these plugins would work. I hope the author (or someone) gets a fix in soon, because I really don’t want to downgrade and run an old & vulnerable version of WP.

    That’ll teach me to upgrade without checking the plugins first! :)

  16. 31.05.2007 at 2:31

    Count me in as another who is having problems with King-Text and WP 2.2. I hope we can get a fix from the author soon, because I’ve tried multiple workarounds and nothing has been successful. King-Text was a major component of my site design and I’ve had to switch themes as a result. Please help us, Georg!

  17. 29.05.2007 at 23:39

    Theme site lince looks nice..Thanks

  18. 27.05.2007 at 18:24

    thankk you First of all let me thank you

  19. 26.05.2007 at 21:46

    ayep, framework still activates but the rest are broken in WP 2.2

  20. MXV's Gravatar MXV
    25.05.2007 at 17:48

    Hello.

    Upon upgrading to WP 2.2 this plug in does not work. When you try and activate it, it breaks. The King Framework still activates.

    How can I make this work again? I rely on it heavily for things in my sidebar that I wasn’t able to do in regular txt widgets. Please help.

  21. 24.05.2007 at 14:13

    […] PHP-Widgets, allen voran das berühmte King-Text-Widget, funktionieren nicht mehr. Sie erwarten das Sidebar-Widget-Plugin von Automattic welches es ja nun […]

    Thanks You 😉

  22. 16.05.2007 at 8:38

    Hi, I thing that King_Text_Widget or the frmework doesn’t work with wordpress 2.2. Best

  23. 08.05.2007 at 11:27

    thanks my site http://www.itirafchat.com

  24. 08.05.2007 at 2:04

    my site thanks http://www.sedasiz.com

  25. 07.05.2007 at 4:21

    Ich würde aber gerne wissen ob auch für das Text Widget ein lazy loading möglich ist… das ist meines Erachtens eines der wichtigsten Features beim RSS und beim Text Widget, gerade wenn man excesive mit php arbeiten kann 😉

    Best

  26. 23.04.2007 at 17:37

    Hi, I’m not able to use your plugin. I correctly put the king-includes in the plugin directory e the king-test.php in the same directory in which is widgets.php.
    The problem is that i’m not able to move „king test sidebar“ in the sidebar widgets menu from the admin panel. Could You help me? Thanks a lot in advance

  27. 16.04.2007 at 11:56

    nice text. thank you all

  28. 12.04.2007 at 16:39

    Today I found my favorite widget maker, King, has made it easy, with King Text

  29. Tom's Gravatar Tom
    21.03.2007 at 16:46

    Ich habe bei mir (WP2.1) alle Widgets aus der functions.php übernommen in das King Text Widget und ich muss sagen..einfach Königlich 😀

    Wobei dann bei mir leider die SQL Abfrage Zeit nach oben geschossen ist auf 3-4 Sekunden…was vorhin nicht war.. muss sich wohl erst noch ein schwingen 😉

    Ich würde aber gerne wissen ob auch für das Text Widget ein lazy loading möglich ist… das ist meines Erachtens eines der wichtigsten Features beim RSS und beim Text Widget, gerade wenn man excesive mit php arbeiten kann 😉

    ach, das könnte auch die erhöhte abfrage Zeit erklären. dass die calls der functions.php nun anderst gehandhabt werden 😉

    Aber ansonsten..echt sensationell … vielen Dank 😀

  30. sonika's Gravatar sonika
    04.02.2007 at 21:27

    Is it work with wordpress 2.1?

  31. Dan's Gravatar Dan
    27.01.2007 at 19:18

    Great plugin! I needed to be able to put php in a text widget, and this does the trick.

    When I installed your plugin with WP2.1, I got an error message and had to change line 24 of king-text.php. It includes widget.php, which is now in the widgets folder. I changed it to:
    include_once(ABSPATH . ‚wp-content/plugins/widgets/widgets.php‘);

  32. 17.01.2007 at 15:32

    Hi

    I use your King Text widgets A LOT on my blogs – it has helped me so much along the way.
    However, I’ve just installed Internet Explorer 7.0 and have encountered a major problem. Although my widgets still work, I’m not able to open them in my sidebar widgets editor. Only titles appear, on a blue background (Basic Features, Where to show, Widget HTML). When I click on the title, it slides down showing the form and then immediately slides back again, so that I cannot work with the form.

    Your help (as soon as possible) will be greatly appreciated

    Thank you

    Halina

  33. 05.12.2006 at 20:37

    I notice that this was already mentioned at the beginning of the thread, but it doesn’t seem to be implemented yet. I have 13 King Text widgets running on my theme. When I am editing the sidebar, I have to remember which is which because they don’t have distinct names. It would be nice to have the ability to do that.

  34. 02.12.2006 at 13:23

    First of all, thanks for all of the work on these great little plugins for WordPress.

    I also wanted to report that I’ve experienced the issue with the PHP checkbox coming unchecked whenever I make a change to any of the plugins.

    I saw your previous comments about using FireFox, but I just don’t have that option most of the time. If there was any way to get that option to stay checked it would be the best modification I could suggest for this plugin.

    Thanks again for everything.

    John

  35. 01.12.2006 at 16:54

    I do have the same problem. It happened when i update IE7 and FireFox 2 :( i don’t know what to do any suggest?

  36. ASU Service's Gravatar ASU Service
    29.11.2006 at 18:28

    Hi,
    Thanks for the great plug-in. I’m having one small problem I hope someone can help with.

    I got everything working but when I try to configure the King Text box in the sidebar widget the window will show with all items collapsed. When I click each item it will expand then immediately collapse and it wont open again.

    Any thoughts?

    Thanks in advance for your time.

  37. ovidiu's Gravatar ovidiu
    04.11.2006 at 17:15

    hallo,

    ich sehe gerade, daß die bevorzugte Sprache hier deutsch ist. Ich habe eine dringende Bitte um Hilfe:

    ich würde wirklich gerne dieses Widget benutzen, weil es eines der besten ist aber wie gesagt, ich gebe z.b. eine php zeile im widget ein, hake php code an, speichere, und wenn ich das widget wieder öffne ist es leer.

    das bringt mich zum verzweifeln, bitte gebt mir einen tipp. weiter oben sagte jemand was von wegen lokalen cache löschen und so aber das bringt mir nichts, es geht weder von daheim noch von der arbeit aus obwohl ich den cache gelöscht habe…

  38. ovidiu's Gravatar ovidiu
    31.10.2006 at 13:43

    well, the behaviour can be described like this: I enter my php/html text, save and edit the widget again and it has forgotten his text :-) – did I mention I use wpmu? where does the widget store its info?

  39. ovidiu's Gravatar ovidiu
    30.10.2006 at 13:13

    ok, last try if this does not work I know not what to do:

    searchlite();

    this should be inside a php function

1 Trackback to WordPress Widget: King Text (+php) (+html)

  1. By on 05.07.2009 at 15:38
  2. By on 02.06.2009 at 8:25
  3. By on 31.01.2009 at 22:25
  4. By on 05.09.2008 at 14:46
  5. By on 06.01.2008 at 12:43
  6. By on 23.08.2007 at 10:41
  7. By on 16.07.2007 at 1:12
  8. By on 15.07.2007 at 15:54
  9. By on 14.07.2007 at 13:58
  10. By on 15.06.2007 at 7:48
  11. By on 01.06.2007 at 5:02
  12. By on 31.05.2007 at 2:46
  13. By on 20.05.2007 at 9:52
  14. By on 18.05.2007 at 11:18
  15. By on 17.05.2007 at 4:12
  16. By on 17.05.2007 at 0:44
  17. By on 17.05.2007 at 0:41
  18. By on 01.04.2007 at 20:48
  19. By on 16.03.2007 at 8:12
  20. By on 11.03.2007 at 18:46
  21. By on 30.01.2007 at 7:41
  22. By on 13.01.2007 at 23:17
  23. By on 18.12.2006 at 22:33
  24. By on 08.12.2006 at 11:53
  25. By on 05.12.2006 at 1:19
  26. By on 04.12.2006 at 18:38
  27. By on 28.11.2006 at 0:08
  28. By on 27.11.2006 at 19:49
  29. By on 19.11.2006 at 14:10
  30. By on 13.11.2006 at 2:25
  31. By on 25.07.2006 at 3:55
  32. By on 06.07.2006 at 3:16
  33. By on 08.06.2006 at 22:57
  34. By on 04.06.2006 at 23:58
  35. By on 09.05.2006 at 1:09
  36. By on 28.04.2006 at 20:35
  37. By on 24.04.2006 at 15:34