1. Herzlich willkommen bei WPDE.org, dem grössten und ältesten deutschsprachigen Community-Forum rund um das Thema WordPress. Du musst angemeldet oder registriert sein, um Beiträge verfassen zu können.
    Information ausblenden

Plugin Ein- und Ausblenden einzelner Widgets?

Dieses Thema im Forum "Plugins und Widgets" wurde erstellt von griffon, 25. Januar 2010.

Schlagworte:
  1. griffon

    griffon Well-Known Member

    Registriert seit:
    15. Januar 2010
    Beiträge:
    172
    Zustimmungen:
    0
    Hallo,

    ich baue mir grade lokal einen Fotoblog und habe auf verschiedenen Seiten verschiedene Sidebars. Nun würde ich gern die einzelnen Widgets so gestalten, dass diese ein- und ausblendbar sind, also mit einem Klick-gebundenem jQuery-Skript oder - idealer - Plugin arbeiten. Man soll also auf die Überschrift der Widets klicken können, sodass dieses sich öffnet und bei erneutem Klick sich selbiges schließt. Manche Widgets sollen aber auch offen dargestellt werden und sich bei Klick dann "schließen".

    Ich bin dabei auf folgende Seiten gestoßen:

    http://api.jquery.com/click/
    http://api.jquery.com/slideToggle/

    Es sollte sicher möglich sein, dass mit dem Skript oben zu verwirklichen. Aber: Wo kann ich eigentlich den Code der Widgets (meiner Seite!) bearbeiten und das Skript einfügen?

    Oder sieht noch jemand ne elegantere Lösung? :smile:

    Beste Grüße,

    griffon
     
  2. griffon

    griffon Well-Known Member

    Registriert seit:
    15. Januar 2010
    Beiträge:
    172
    Zustimmungen:
    0
    Hat denn keiner ne Idee?
     
  3. griffon

    griffon Well-Known Member

    Registriert seit:
    15. Januar 2010
    Beiträge:
    172
    Zustimmungen:
    0
    vielleicht mal ein beispiel - ich hätte es gerne so:

    http://ocaoimh.ie/

    idealerweise sollten die zuklappmachanismen langsam sliden. kann mir da wer helfen?
     
  4. cyberworx

    cyberworx Active Member

    Registriert seit:
    25. Januar 2010
    Beiträge:
    28
    Zustimmungen:
    0
  5. griffon

    griffon Well-Known Member

    Registriert seit:
    15. Januar 2010
    Beiträge:
    172
    Zustimmungen:
    0
    ja, richtig - aber ich sehe schon: mit meiner 2.9-version läufts nicht, ich werde wohl auf die 2.9.1 updaten müssen, damit die fehlermeldung einer fehlenden klasse ("dynWid") irgendwie behoben wird...werd ich mich heute abend mal dransetzen!

    aber vielen dank erstmal! :)
     
  6. qurl

    qurl Member

    Registriert seit:
    14. Februar 2010
    Beiträge:
    6
    Zustimmungen:
    0
    Hello,

    My German is very bad, so I hope you understand I'll write in English. I'm the developer of Dynamic Widgets.

    When you get an error about the dynWid class, it's probably your host is (still) using PHP4. Up to version 1.1.1 the plugin does not support PHP4. However I do have a replacement file availabe which might solve your problem. Just unpack the ZIP and replace dynwid_class.php

    The next version (1.2) will have PHP4 support.
     
  7. griffon

    griffon Well-Known Member

    Registriert seit:
    15. Januar 2010
    Beiträge:
    172
    Zustimmungen:
    0
    hello overthere,

    and thank you for your answer in perfect english ;) I'll try to answer in english too - but my german is much more better :lol:

    i replaced the file you gave the link to, but this doesn't fix the problem. maybe, there is problem with the local usage of Wordpress ( i use xammp with php version 5.3.0) - i'll test the plugin again in 2 or 3 weeks: i hope thats the date when my site goes online. or there is a problem with another plugin... i installed e.g. sidebar-generator (thats the only one where i can modify the options in the "design"-area).

    or i will wait for version 1.2 - do you know, when you'll release it?

    and the main-question is: can i hide widgets on the sidebar with the plugin (thats the reason i want to use it for...) like it was done here:

    http://ocaoimh.ie/

    with best greetz,

    griffon :smile:
     
  8. qurl

    qurl Member

    Registriert seit:
    14. Februar 2010
    Beiträge:
    6
    Zustimmungen:
    0
    Hallo griffon,

    I've had a quick look in the sidebar-generator source code and it looks like it takes over the sidebar implementation WordPress standard uses and Dynamic Widgets expects. So, yeah... it's very likely this is the problem Dynamic Widgets is not working. The new version won't fix that. The way sidebar-generator works is actually another approach of displaying and hiding widgets in the sidebar(s). The result is more or less the same.

    That brings me to the second part of your question re the way widgets are being hidden at http://ocaoimh.ie/ That's not the way Dynamic Widgets shows or hides widgets. It hides widgets in the background. Widgets don't just appear in the sidebar when the rules applied to a specific widget instructs so. The hiding and showing at http://ocaoimh.ie/ is more a theme related thing.

    Just for the record: I hope to release version 1.2 of Dynamic Widgets somewhere this week. I'm conducting the last tests.

    Last but not least: You're definetly using PHP5 now, so replacing the dynwid_class.php file was actually a bad idea in this case. The replacement file uses old (deprecated in PHP5) PHP functions.

    Gruße, Jacco
     
  9. griffon

    griffon Well-Known Member

    Registriert seit:
    15. Januar 2010
    Beiträge:
    172
    Zustimmungen:
    0
    hello again,

    and thanks for your answer!

    maybe it'll be useful if you would have a look at the "sidebar generator" and try to make the plugins compatible with each other... but if the result is quite the same... why should i use two plugins? :wink:
    however, i'll wait for the new version of "dynamic widgets", try it and decide which plugin is better for me.

    but thanks a lot for your patience and help with my problems.
    the question in this thread is about showing and hiding widgets - maybe you have an idea how to find a solution for this problem? this would be very ... cool :lol:

    and hey - perfect: "Grüße" back to ... the netherlands?

    griffon
     
  10. qurl

    qurl Member

    Registriert seit:
    14. Februar 2010
    Beiträge:
    6
    Zustimmungen:
    0
    Hi again,

    Yeah, I don't think it would be very usefull to let two plugins which do more or less the same job work with eachother.

    Ok, now about the collapsing and expanding widgets. First of all I'm not a JavaScript expert. But it can be done with jQuery.
    HTML:
    Entschuldige, aber du musst dich registrieren oder anmelden um den Inhalt sehen zu können!
    I've used slideToggle() in this example. You can also use toggle(). De number between the parenthesis is the number of ms to take before the action completes. You can also use 'slow' or 'fast' for example.

    There is a catch with this script. You have to know the id's of the divs. Maybe this can be done with JS. I don't know, that's my lack of knowledge of JS. I know it's possible to grab the id's with PHP as the id's are the same as the internal widget id's assuming you're working with the standard WordPress implementation of the sidebar(s) ;)

    Grüße - from indeed the Netherlands -, Jacco
     
  11. griffon

    griffon Well-Known Member

    Registriert seit:
    15. Januar 2010
    Beiträge:
    172
    Zustimmungen:
    0
    thanks a lot for your help - i guessed, that it must be possible with jquery!

    i googled a little bit around and found out, that "$args['widget_id']" must be the right tag to identify the ids of the widgets - but i don't really know how to implement it in the script (however, it also should work ;)).

    is it really necessary to copy the content of the widgets i want to show/hide in the area you wrote to do it? i want to get the collapse/expand-function for all widgets...

    thanks a lot - and greetz to the netherlands (i lived one year in kempen (germany) nearly venlo, maybe you know it? and i love zeeland (westkapelle) ;))

    griffon
     
  12. griffon

    griffon Well-Known Member

    Registriert seit:
    15. Januar 2010
    Beiträge:
    172
    Zustimmungen:
    0
    hi,

    its me again :lol:

    i found out that there is really cool plugin for doing what we want to realize: the sidebar widget collapser!

    but now theres one problem: how do i get the ids of my widgets/sidebars? hmmm....

    griffon
     
  13. qurl

    qurl Member

    Registriert seit:
    14. Februar 2010
    Beiträge:
    6
    Zustimmungen:
    0
    Hi there,

    Sidebar and widget id's are located in the array returned by wp_get_sidebars_widgets() as array( sidebar_id => array(widget_id) )

    Actually, I do know Kempen (by name). I've been to Duisburg a lot of times when I was working for an international internet service provider.


    Groet ("Grüße" in Dutch), Jacco
     
  14. griffon

    griffon Well-Known Member

    Registriert seit:
    15. Januar 2010
    Beiträge:
    172
    Zustimmungen:
    0
    perfect - thanks for your help!

    the topic of the "sidebar widget collapser"-plugin will be continued in the plugin-forum of wordpress-deutschland.org (click here).

    yes, i also know duisburg well. but i think the landscape of the netherlands is much more beautiful... ;)

    Veel groeten aan Nederland en een mooie dag nog (did i translate it correctly? ;))

    griffon
     
  15. qurl

    qurl Member

    Registriert seit:
    14. Februar 2010
    Beiträge:
    6
    Zustimmungen:
    0
    Perfectly translated! :p

    I'll follow the "sidebar widget collapser-plugin"-thread from the side (with the help of Google Translate). But first I'm going to finish version 1.2 of my own plugin. ;)
     
  16. griffon

    griffon Well-Known Member

    Registriert seit:
    15. Januar 2010
    Beiträge:
    172
    Zustimmungen:
    0
    all right - but your following of the wsidebar-widget-collapser-plugin-thread isn't really necessay if you are not interested in! it'll be better if you spend your time on completing "dynamic widgets" ;)

    however,i'll test version 1.2!

    Een prachtige avond en veel successen :smile: (some words are still in my mind ;))

    griffon
     
  17. exciter

    exciter Member

    Registriert seit:
    10. Januar 2010
    Beiträge:
    15
    Zustimmungen:
    0
    Hi, ich nutze widget logic, funzt gut mit WP 2.9.1.

    Weiß nicht, wahrscheinlich hast du dein Problem eh schon gelöst :wink:
     
  18. griffon

    griffon Well-Known Member

    Registriert seit:
    15. Januar 2010
    Beiträge:
    172
    Zustimmungen:
    0
    hi,

    also beim ersten kurzen drüber gucken gehts bei dem plugin ja eher darum, wdgets in einigen sidebars (bzw. seiten) auszublenden - ähnlch dem plugin "dynamic widgets" von qurl. und das schien mir auf den estn blick kofortabler in der bedienung...

    mein problem war ja viel mehr, dass ich ein plugin bekomme, welches einzelne widgets ein- und ausblenden lässt. mit jquery geht das zwar - ist aber nur komfortabel, wenn man seine widgets manuell (ohne drag and drop) zusammenstellt (was ich nicht mache).

    aber vielen dank trotzdem für deinen hinweis!!

    grüße,

    griffon
     
  19. qurl

    qurl Member

    Registriert seit:
    14. Februar 2010
    Beiträge:
    6
    Zustimmungen:
    0
    @griffon
    Actually I am interested... Just for kicks. :wink: Also it's good to try to bring my German back up to speed (a bit). Reading to be honest, I won't start writing. That would probably only be "quatsch". Thanks for your positive words about Dynamic Widgets by the way!

    @exciter
    Widget Logic uses the same approach as Dynamic Widgets. And it is more flexible, but -here comes the down side- you have to understand and write programming code. From my point of view bloggers shouldn't need to write programming code. Bloggers should write articles. 8) But hey, that's a total different discussion.
     
  1. Diese Seite verwendet Cookies, um Inhalte zu personalisieren, diese deiner Erfahrung anzupassen und dich nach der Registrierung angemeldet zu halten.
    Wenn du dich weiterhin auf dieser Seite aufhältst, akzeptierst du unseren Einsatz von Cookies.
    Information ausblenden
  1. Diese Seite verwendet Cookies, um Inhalte zu personalisieren, diese deiner Erfahrung anzupassen und dich nach der Registrierung angemeldet zu halten.
    Wenn du dich weiterhin auf dieser Seite aufhältst, akzeptierst du unseren Einsatz von Cookies.
    Information ausblenden