WordPress: Gallery Widget WordPress-Plugin zum Anzeigen der neusten/zufälligen Bilder der “Builtin Gallery” in Wordpress via Widget in der Sidebar oder direkt im Template mit der PHP-Funktion (Link: Gallery Widget)...

 
 
Themen-Optionen
  #1  
Alt 10. February 2009, 14:32
Benutzerbild von cybio
cybio cybio ist offline
aka maverick :)
Master of Spam
Punkte: 12.103, Level: 76 Punkte: 12.103, Level: 76 Punkte: 12.103, Level: 76
Aktivität: 0% Aktivität: 0% Aktivität: 0%
 
Registriert seit: Dec 1999
Ort: unrealEXTREME.de
Beiträge: 3.506
Renommee-Modifikator: 10
cybio will become famous soon enough
    Neutral 
Exclamation FAQ (english)

How can i adjust the look of the Widget?

Just use the CSS-Class "wGallery" to alter the ul- or li-tags.

How can i get only the images of one/some categories?

Use the category-option include or exclude and enter the id's separated by comma
in the options of the widget.
Using include or exlcude causes more sql-queries and is slower than the base function.
You should only use it if you're blog doesn't have to much traffic and/or your
host can handle it

Why doesn't the images link to the parent article?

This option actually only works with "category-option" set to include or exclude.

Is it possible to show the images at any position in the theme (not only as widget)?

These functions are depreciated and will be deactivated soon, please use the object/methods, see below!


Yes, you can use the following code to include the images:

PHP-Code:
<?php if ( function_exists(get_attached_images) ) : ?>
<?php 
echo get_attached_images(maximages, [latest|random], [old|direct], css-class); ?>
<?php 
endif; ?>
for instance, 5 random images:
PHP-Code:
<?php if ( function_exists(get_attached_images) ) : ?>
<?php 
echo get_attached_images(5'random'); ?>
<?php 
endif; ?>
latest 7 images of the categories 1, 2 and 5, only 1 image per post/link to article (css: wGallery, relation: lightbox):
PHP-Code:
<?php if ( function_exists(get_attached_images) ) : ?>
<?php 
echo get_attached_images_by_categories(7'latest''1,2,5''include''article''wGallery''lightbox''yes'); ?>
<?php 
endif; ?>
__________________
splash.de /// unrealEXTREME.de >>> unrealLegacy.de

Geändert von cybio (11. March 2009 um 10:47 Uhr)
  #2  
Alt 11. March 2009, 10:45
Benutzerbild von cybio
cybio cybio ist offline
aka maverick :)
Master of Spam
Punkte: 12.103, Level: 76 Punkte: 12.103, Level: 76 Punkte: 12.103, Level: 76
Aktivität: 0% Aktivität: 0% Aktivität: 0%
 
Registriert seit: Dec 1999
Ort: unrealEXTREME.de
Beiträge: 3.506
Renommee-Modifikator: 10
cybio will become famous soon enough
    Neutral 
AW: FAQ (english)

= How do i use the shortcodes? =

Latest 5 images linking to the attachment page (default option):
Code:
[getGWImages]
You could use the following parameters:
- max=int
- order='latest|random'
- linktype='direct|page'
- linkclass='css class'
- linkrel='relation for the link'

i.e. 3 random images with a link to the images:
Code:
[getGWImages max=3 order=random]
If you would like to use the category include/exclude options you have to use
this shortcode:

Code:
[getGWImages2]
The following parameters are possible:
- max=int
- order='latest|random'
- categories='comma separated list of category id's'
- option='include|exclude'
- linktype='direct|page'
- linkclass='css class'
- linkrel='relation for the link'
- singleimage='yes|no'
__________________
splash.de /// unrealEXTREME.de >>> unrealLegacy.de
  #3  
Alt 11. March 2009, 10:49
Benutzerbild von cybio
cybio cybio ist offline
aka maverick :)
Master of Spam
Punkte: 12.103, Level: 76 Punkte: 12.103, Level: 76 Punkte: 12.103, Level: 76
Aktivität: 0% Aktivität: 0% Aktivität: 0%
 
Registriert seit: Dec 1999
Ort: unrealEXTREME.de
Beiträge: 3.506
Renommee-Modifikator: 10
cybio will become famous soon enough
    Neutral 
AW: FAQ (english)

= Is it possible to show the images at any position in the theme (not only as widget)? =

Yes, you can use the following code to include the images:

PHP-Code:
<?php if ( is_object($galleryWidget) ) : ?>
<?php 
echo $galleryWidget->getAttachedImages(maximages, [latest|random], [old|direct], css-class, link-relation); ?>
<?php 
endif; ?>
for instance, 5 random images:

PHP-Code:
<?php if ( is_object($galleryWidget) ) : ?>
<?php 
echo $galleryWidget->getAttachedImages(5'random'); ?>
<?php 
endif; ?>
latest 7 images of the categories 1, 2 and 5, only 1 image per post/link to article (css: wGallery, relation: lightbox):

PHP-Code:
<?php if ( is_object($galleryWidget) ) : ?>
<?php 
echo $galleryWidget->getAttachedImagesByCategories(7'latest''1,2,5''include''article''wGallery''lightbox''yes'); ?>
<?php 
endif; ?>
Attention: If you wan't to use the galleryWidget-object in a function (like the sidebar), you have to include the global variable $galleryWidget (add
PHP-Code:
global $galleryWidget
before if())
__________________
splash.de /// unrealEXTREME.de >>> unrealLegacy.de

Geändert von cybio (20. June 2010 um 12:05 Uhr)
  #4  
Alt 20. June 2010, 12:10
Benutzerbild von cybio
cybio cybio ist offline
aka maverick :)
Master of Spam
Punkte: 12.103, Level: 76 Punkte: 12.103, Level: 76 Punkte: 12.103, Level: 76
Aktivität: 0% Aktivität: 0% Aktivität: 0%
 
Registriert seit: Dec 1999
Ort: unrealEXTREME.de
Beiträge: 3.506
Renommee-Modifikator: 10
cybio will become famous soon enough
    Neutral 
AW: FAQ (english)

= Shortcode-Example using CSS =

To show 9 random images:

- In your article just post the following (in html, not wysiwyg-mode)
PHP-Code:
<div class=&#8221;testClass”>
getGWImages max=9 order=random linkclass='testClass' ]
</
div
- Add the following to the style.css of your theme
PHP-Code:
/* TestClass */
.testClass {
overflowhidden !important;
padding10px 5px !important;
}
.
testClass ul {
floatleft !important;
}
.
testClass li {
list-
style-typenone !important;
displayinline !important;
padding5px !important;
floatleft !important;
margin5px !important;
width150px !important/* size of the thumbnail */
height150px !important/* size of the thumbnail */
}
.
testClass li a img, .testClass li a:visited img {
bordersolid 1px #fff !important;
}
.
testClass li a:hover img {
bordersolid 1px #000 !important;

__________________
splash.de /// unrealEXTREME.de >>> unrealLegacy.de
 

Themen-Optionen

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.

Gehe zu

Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
english auf deusch benZ Unreal Tournament 2003/2004 3 11. September 2004 23:37


Alle Zeitangaben in WEZ +2. Es ist jetzt 15:15 Uhr. Powered by vBulletin® (Deutsch)
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd. - Copyright 1998-2016 by splash .de (unrealEXTREME.de)
Unreal II - The Awakening, Unreal Tournament 2004, Gears of War, Unreal Tournament 3 (c) Epic Games, Inc.
Alle Rechte vorbehalten - Datenschutz - Impressum