PG theme

LFrank

Joined: 2005-02-19
Posts: 1023
Posted: Thu, 2005-08-04 07:00
mindless wrote:
pgilbert, when you've updated to use $params['peerWindowSize'] then you should update your theme.html to not recommend modifying GalleryTheme.class anymore.. thanks!

seems not to be implemented yet - I tried myself locally, but failed adding the
line
'peerItemIndex' => '15'
to the default settings and
$settings[] = array('key' => 'peerItemIndex', 'name' =>
$this->translate('Photo
- Peer Items displayed (10 to 40)'),
'type' => 'text-field',
'type-params' =>
array('size' => 2),
'value' => $params['peerItemIndex']);
to the photo block in theme.inc.
Could you give me a hint what I made wrong... (to prevent editing the *.class from the last CVS).

I've used the "peerItemIndex" because this variable was used because this is in the if statement of the class-File and not the "peerWindowSize".

 
pgilbert

Joined: 2005-03-28
Posts: 157
Posted: Thu, 2005-08-04 11:20

mindless,
Can you help-me how to check if slideshou module is active?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-08-04 11:47
	list ($ret, $pluginStatus) = GalleryCoreApi::fetchPluginStatus('module');
	if ($ret->isError()) {
	    return array($ret->wrap(__FILE__, __LINE__), null);
	}
	if (!empty($pluginStatus['slideshow']['active'])) {
	    // slideshow module is active
	}

note: is this check really needed?

 
pgilbert

Joined: 2005-03-28
Posts: 157
Posted: Thu, 2005-08-04 11:56

valiant,
Thks.
On PG theme I want to display a image with a link only if the module is active, and I don't know how to do that

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-08-04 12:48

hmm, don't quite understand the exact application. once you implemented it, i can tell you if it could have been done simpler.

 
pgilbert

Joined: 2005-03-28
Posts: 157
Posted: Thu, 2005-08-04 13:41

Unfortunatly I'm trying but I don't know how i should implemet that.

Can you help me , a simple way of doing some thing like that on a ".tpl" file.

{if slideshow is active}
show link
{/if}

 
DeathMan

Joined: 2005-07-03
Posts: 6
Posted: Thu, 2005-08-04 15:35

Can I check in this theme how many some picture has been viewed ? There is some statistics page ?

PS. Sorry for my english :)
PS2. Great theme.

 
IcelandX

Joined: 2003-04-28
Posts: 3
Posted: Thu, 2005-08-04 16:28

pgilbert, great theme! Thanks for sharing your work.

Is there a secret to editing the logo.gif? It just shows up white in PSP. Am I missing something?

Keith

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-08-04 18:22

pgilbert, we don't offer this information at the moment. i guess we'll add it soon.

meanwhile, you have to change your theme.inc, in the show...page functions, add the above code, then assign
if (!empty($pluginStatus['slideshow']['active'])) {
$theme['slideshow'] = 1;
} else {
$theme['slideshow'] =0;
}

and in your album / photo.tpl, you can then use
{if $theme.slideshow}

{/if}

 
pgilbert

Joined: 2005-03-28
Posts: 157
Posted: Fri, 2005-08-05 10:06

valiant, thank's but it's not working, i'm puting that on theme.inc:

function showPhotoPage(&$template, $item, $params) {
	$dataTypes = array('owner', 'parents', 'peers', 'systemLinks', 'itemLinks', 'permissions', 'itemLinksDetailed', 'itemNavigator', 'imageViews');
	if (!empty($params['showMicroThumbs'])) {
	    $dataTypes[] = 'peerThumbnails';
	}
	$ret = $this->loadCommonTemplateData($template, $item, $params, $dataTypes);
	if ($ret->isError()) {
	    return array($ret->wrap(__FILE__, __LINE__), null);
	}

   list ($ret, $pluginStatus) = GalleryCoreApi::fetchPluginStatus('module');
   if ($ret->isError()) {
       return array($ret->wrap(__FILE__, __LINE__), null);
   }
   if (!empty($pluginStatus['slideshow']['active'])) {
       $theme['slideshow'] = 1;
   } else {
      $theme['slideshow'] =0; 
   } 

	return array(GalleryStatus::success(), 'theme.tpl');
    }

and at photo.tpl:

{if $theme.slideshow}
........
{/if}

and that's not working wath's wrong?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-08-05 10:28

before you change the $theme variable, add this line:

$theme =& $template->getVariableByReference('theme');

 
pgilbert

Joined: 2005-03-28
Posts: 157
Posted: Fri, 2005-08-05 10:37

valiant, Working thank's

The last version almost everything seem to be ok (version '0.10.3').
[url]www.pedrogilberto.net/gallery2/theme.html[/url]

 
nexusone

Joined: 2005-08-05
Posts: 4
Posted: Fri, 2005-08-05 19:28

Just installed this with b4 and it's beautiful. However nothing I do seems to make any difference when it comes to getting the sidebar to appear.

I can't find any obvious way to turn this stuff on. I added some blocks via the them control panel but no change. Aside from a logo change the skin is stock and unchanged.

 
LFrank

Joined: 2005-02-19
Posts: 1023
Posted: Fri, 2005-08-05 19:41

pgilbert, marvelous :) (Due to the Insight-Upgrafe-Module-Issues I'm currently facing (see my post in Support), I had to rename it to 0.10.2 to get into the gallery.
I even have now nearly only the portfolio and author as localized templates (besides some really cosmetical adaptations)

 
LFrank

Joined: 2005-02-19
Posts: 1023
Posted: Sat, 2005-08-06 08:12

that's the error I get leaving the version number at 0.10.3

Unable to upgrade the PG Theme theme
Upgrade Other Modules
Stack Trace:
Error (ERROR_BAD_PLUGIN) : Unknown theme version 0.10.2

* in C:\Inetpub\Scripts\GALLERY2\themes\PGtheme\theme.inc at line 472 (GalleryStatus::error)
* in C:\Inetpub\Scripts\GALLERY2\modules\core\classes\GalleryTheme.class at line 544 (PGthemeTheme::upgrade)
* in C:\Inetpub\Scripts\GALLERY2\upgrade\steps\UpgradeOtherModulesStep.class at line 113 (GalleryTheme::installOrUpgrade)
* in C:\Inetpub\Scripts\GALLERY2\upgrade\index.php at line 177 (UpgradeOtherModulesStep::processRequest)

Debug Output:

getParameter permissions.file for core plugin
file_exists(F:\g2data\cache\module/core/0/0/0.inc)
fopen(F:\g2data\cache\module/core/0/0/0.inc, rb, 0)
fread(Resource id #29, 4096)
fclose(Resource id #29)
[1123315640] can't guarantee 300 -- extending!

(mysql): SHOW TABLES

Loading plugin PGtheme
Class not defined, trying to include it.
file_exists(C:\Inetpub\Scripts\GALLERY2\modules\core\classes\helpers/../../../../themes/PGtheme/theme.inc)
PGtheme plugin successfully instantiated
realpath(C:\Inetpub\Scripts\GALLERY2\modules\core\classes/../../..)
Binding text domain: themes_PGtheme ->
C:\Inetpub\Scripts\GALLERY2/themes/PGtheme/locale
GalleryTheme::installOrUpgrade PGtheme theme
GalleryTheme::installOrUpgrade get the version parameter
getParameter _version for PGtheme plugin

(mysql):
SELECT
g2_PluginParameterMap.g_parameterName,
g2_PluginParameterMap.g_parameterValue
FROM
g2_PluginParameterMap
WHERE
g2_PluginParameterMap.g_pluginType = 'theme'
AND
g2_PluginParameterMap.g_pluginId = 'PGtheme'
AND
g2_PluginParameterMap.g_itemId = 0

GalleryTheme::installOrUpgrade compare versions
GalleryTheme::installOrUpgrade, installed version is 0.10.2, theme upgrade
required
realpath(C:\Inetpub\Scripts\GALLERY2\modules\core\classes/../../../)

 
pgilbert

Joined: 2005-03-28
Posts: 157
Posted: Sat, 2005-08-06 16:08

LFrank,

V 0.10.3 upgrade error fixed, download it again

 
LFrank

Joined: 2005-02-19
Posts: 1023
Posted: Sat, 2005-08-06 16:37

pgilbert, perfect now - wow, can you probably give some insight what happened (just for curiosity :))

 
pgilbert

Joined: 2005-03-28
Posts: 157
Posted: Sat, 2005-08-06 21:56

LFrank, on theme.inc at the end of 'function upgrade' was missing: "case '0.10.2':"

 
imsirius

Joined: 2004-07-14
Posts: 34
Posted: Sun, 2005-08-07 02:34

Great theme! Using it with G2 RC1. All is well except I get the following message at the very top of every Photo page:

Warning: Missing argument 4 for showphotopage() in /home/langha/public_html/gallery2/themes/PGtheme/theme.inc on line 348

This doesn't appear on any other page other than individual photos. Any help?

 
boufa

Joined: 2005-08-07
Posts: 1
Posted: Sun, 2005-08-07 03:44

I had the same error, must be a bug. In theme.inc most of the way down, where it says showphotopage, i changed the line..

function showPhotoPage(&$template, $item, $params,$pluginStatus) {

to

function showPhotoPage(&$template, $item, $params) {

I think that this killed my ability to use the slide show though, but it did clear the error. I am hoping for a better fix.

In addition to that, on my setup I seem to only get 9 thumbs, even when there are more than that in the album. I have seen others setups, and they show more than 9 thumbs...anyone know what I am doing wrong?

Thanks
Kevin

http://www.klvance.org/gallery

 
LFrank

Joined: 2005-02-19
Posts: 1023
Posted: Sun, 2005-08-07 04:40

boufa, which version of the gallery are you using?. Since two/three days there is an updated gallerytheme.class in the core distributed which allows to set the number of PeerWindows from within the template admin - before you had to edit the class file directly. Oops - just realized you've had the same error and therefore the new versions.
What did you set for " MicroThumbs - (peerWindowSize) Micro Thumbs diplayed plus first and last" in the template admin?

 
RayEarth

Joined: 2005-08-07
Posts: 10
Posted: Sun, 2005-08-07 07:05

Great theme! But i also have the same problem as the two users above: Warning: Missing argument 4 for showphotopage() in /home/langha/public_html/gallery2/themes/PGtheme/theme.inc on line 348. I have my microthumbs set to [21].

 
skodie

Joined: 2005-08-07
Posts: 8
Posted: Sun, 2005-08-07 07:06

Trying to use the theme with G2 RC1.

Uploaded all of the files and edited theme.js

PG Theme shows up under the All Themes tab, but when I click install nothing happens.

Am I missing something really stupid?

 
LFrank

Joined: 2005-02-19
Posts: 1023
Posted: Sun, 2005-08-07 07:39

skodie, you have to activate the newly installed theme for one of your albums or your site in Album edit

 
sddroog

Joined: 2005-02-01
Posts: 132
Posted: Sun, 2005-08-07 08:30

Great theme!

I just edited Slideshow.tpl to have the correct logo displayed when a colorpack is installed. I changed this:

    <a href="{g->url}" 
onmouseover="logo.src='{g->url href='themes/PGtheme/images/Logoon.gif'}'"  
onmouseout="logo.src='{g->url href='themes/PGtheme/images/Logo.gif'}'"  >
    <img id="logo" src="{g->url href="themes/PGtheme/images/Logo.gif"}" alt="home" longdesc="home"/></a>

to this:

{if empty($theme.params.colorpack)}
       <a href="{g->url}" 
onmouseover="logo.src='{g->url href='themes/PGtheme/images/logoon.gif'}'"  
onmouseout="logo.src='{g->url href='themes/PGtheme/images/logo.gif'}'">
        <img id="logo" src="{g->url href="themes/PGtheme/images/logo.gif"}" alt="home" longdesc="home"/></a>
{else}
        <a href="{g->url}" 
onmouseover="logo.src='{g->url href='modules/colorpack/packs/'}{$theme.params.colorpack}/images/logoon.gif'"  
onmouseout="logo.src='{g->url href='modules/colorpack/packs/'}{$theme.params.colorpack}/images/logo.gif'">
        <img id="logo" src="{g->url href='modules/colorpack/packs/'}{$theme.params.colorpack}/images/logo.gif" alt="home" longdesc="home"/></a>
{/if}

I think I copied this code from theme.tpl.

 
RayEarth

Joined: 2005-08-07
Posts: 10
Posted: Sun, 2005-08-07 11:20

Oh and the fade-in feature doesn't seem to be very compatible with Firefox. It just forever loops 'loading photo'.

Every now and then (10% of the time) it would work perfectly. Any suggestions?

 
pgilbert

Joined: 2005-03-28
Posts: 157
Posted: Sun, 2005-08-07 13:02

PGtheme with some bugs fixed working on RC1 (version: '0.10.3' build: '2')

http://www.pedrogilberto.net/gallery2/theme.html

 
skodie

Joined: 2005-08-07
Posts: 8
Posted: Sun, 2005-08-07 16:25

LFrank - It dosn't get to that point. When I click install it dosn't do anythihg so the theme dosn't appear as an option to be set as a defalut theme or to be used with any of the albums.

 
LFrank

Joined: 2005-02-19
Posts: 1023
Posted: Sun, 2005-08-07 16:49

skodie, have you activated it on the first page ("All Themes") of the Themes Setup? If Yes, ...
... strange ...

 
skodie

Joined: 2005-08-07
Posts: 8
Posted: Sun, 2005-08-07 17:08

LFrank - When I click install for every other theme I get two new links (activate & uninstall). When I click install for the PG Theme, it dosn't do anything. The install link stays.

 
imsirius

Joined: 2004-07-14
Posts: 34
Posted: Sun, 2005-08-07 17:27
pgilbert wrote:
PGtheme with some bugs fixed working on RC1 (version: '0.10.3' build: '2')

http://www.pedrogilberto.net/gallery2/theme.html

Do you have a list of what was fixed? Did it address the problem I and someone else posted on the previous page? Thanks, great work.

I do have another question if anyone knows the answer:

How do I get the site navigation links to appear at the top to show where the user is?

 
pgilbert

Joined: 2005-03-28
Posts: 157
Posted: Sun, 2005-08-07 18:23

imsirius, bug "on line 348" fixed as boufa wrote, and you can use Slide Show.

Quote:
imsirius, said
How do I get the site navigation links to appear at the top to show where the user is?

And i add an option to show/hide this stuff...

PGtheme (version: '0.10.4' build: '2')
http://www.pedrogilberto.net/gallery2/PGtheme_V0.10.4B2.zip

 
RubenZamora

Joined: 2005-08-07
Posts: 3
Posted: Sun, 2005-08-07 21:15

The theme is really nice, my only beef is that when your viewing an image and click a thumb it has to reload the whole PAGE. Why not just load the image where other one was. Why have to do a whole page refresh ?

 
patrickthickey
patrickthickey's picture

Joined: 2004-08-22
Posts: 164
Posted: Sun, 2005-08-07 23:44

This is a characteristic of HTML. It has nothing to do with Pedro's theme, Gallery 2 or customizing either.

patrick

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2005-08-08 00:14

You might be able to customize this yourself. If you or your the majority of your visitors are on broadband you might be able to use javascript to preload the images then perform image swapping when you click on a thumbnail.

Your dial-up users might not appreciate it all that much though ;)

However, you might still be able to do the image swapping with javascript just don't preload the image. Use javascript to bring your "loading" animated gif to the forground over the existing image then they'll slowly see the image they clicked on appear over that.

This is just a bunch of random thoughts and I don't know how easy or hard it would be to actually implement or even possible with how G2 is coded.

 
sddroog

Joined: 2005-02-01
Posts: 132
Posted: Tue, 2005-08-09 12:40

Is it possible to remove the 'Options' menu option in the slideshow? It doesn't work and I don't think it is neccesary to have that option during a slideshow anyway.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Tue, 2005-08-09 14:00

Are you referring to the menu of options at the top when in the slideshow and not the java based slideshow applet?

If so you should be able to customize /modules/slideshow/templates/Slideshow.tpl to show only the stuff you want.

Be sure to follow the instructions at the top of the file about creating a local directory.

 
pgilbert

Joined: 2005-03-28
Posts: 157
Posted: Tue, 2005-08-09 15:14

sddroog,
I fixed the 'Option' at top menu, it wasn't working but if working i think that the only action available it's "searching".
I think also that's not needed during the slideshow so i mantained the 'Option' to have the same top menu but disable it.

Updated to (version: '0.10.3' build: '3') at:
http://www.pedrogilberto.net/gallery2/theme.html

 
LFrank

Joined: 2005-02-19
Posts: 1023
Posted: Tue, 2005-08-09 16:53

pgilbert, 10.3 ?? I've thought version: '0.10.4' Build:'3' aka 'Service Pack 3' is the latest ;)

 
Erehwon
Erehwon's picture

Joined: 2004-01-16
Posts: 33
Posted: Tue, 2005-08-09 17:01

Was curious if there is a way to edit the 'title' font size? I've noticed in the edit captions area there is not an option for size. It's just a tab big for my tast =)

Great theme!

 
LFrank

Joined: 2005-02-19
Posts: 1023
Posted: Tue, 2005-08-09 17:30

Erehwon, you can change it in the theme.css (.giTitle) to a value you like. You might want to put your changes in a 'local' folder (works for the css too :))

.giTitle, #gallery h2, #gallery h3, #gallery h4 {
font-size: 1.3em;
font-weight: bold;
color: #eee;
}

.giTitle2 {
font-size: xx-small;
font-weight: normal;
color: #c7c7c7;
}

I've added a second one to differentiate the File Names from the Titles.

 
Erehwon
Erehwon's picture

Joined: 2004-01-16
Posts: 33
Posted: Tue, 2005-08-09 18:53

Ahh thanks LFrank... I'll give that a try :D

Edit: That worked... but the next question is:

.giTitle, #gallery h2, #gallery h3, #gallery h4

What heading refers to what setting? Example:

Does h2 = title ; h3 = album name? Etc Etc

Then, if I want to change the size for each individual heading is it done as thus:

.giTitle, #gallery h2 {

and

.giTitle, #gallery h3 {

etc etc for each one I want to do ??

Thanks!

 
LFrank

Joined: 2005-02-19
Posts: 1023
Posted: Tue, 2005-08-09 19:53

Erehwon, if you don't have a CSS browser by hand to see what the code does, a tip could be to display the page source and look what kind of "<div " is in front of the specific entry.
I.e. a "view" on the source of an entry on my album page:

<p class="giTitle2">
▪ Portraits ▪
</p>
<p class="giDescription">
Portraits, People and Faces
</p>
<div class="block-core-ItemInfo giInfo">
<span class="date summary">
Date: 31.07.2005
</span>
<span class="size summary">
Size: 5 items
(90 items total)
</span>
<span class="viewCount summary">

shows the different descriptions. If you want to have different styles for different headings you might need to edit the template itsself.

 
Erehwon
Erehwon's picture

Joined: 2004-01-16
Posts: 33
Posted: Tue, 2005-08-09 19:59

Thanks amigo :D

 
Erehwon
Erehwon's picture

Joined: 2004-01-16
Posts: 33
Posted: Tue, 2005-08-09 20:09

Nother question:

http://www.troyandtina.com/gallery2

I would like to be able to remove the bullets from the album names... have no clue where to look to remove those

 
LFrank

Joined: 2005-02-19
Posts: 1023
Posted: Wed, 2005-08-10 04:23

Erehwon, I'm mot 100% sure - but worth a try ;)

I you look in album.tpl, you find:

{if $theme.params.ItemsTitle}
{if !empty($child.title)}
<p class="giTitle">
{if $child.canContainChildren}
{g->text text="▪ %s ▪" arg1=$child.title|markup}
{else}
{$child.title|markup}
{/if}
...

The two characters "▪" concatenated to the title look like the 'bullet' points your looking for.

EDIT: Posting gave the proove - the charachters are like & # 9 6 4 2 without the blanks

 
NickJensen

Joined: 2005-06-19
Posts: 3
Posted: Wed, 2005-08-10 10:18

This theme is awesome! Thanks Pedro!

Just one question though, I saw someone ask it earlier but it didn't really get addressed, is it possible to add how many times each pic has been viewed? I'm no coder and looking through the Matrix theme tpls and trying to find out how to do this is a bit difficult.

If anyone could point me in the right direction that'd be great! :P

 
Erehwon
Erehwon's picture

Joined: 2004-01-16
Posts: 33
Posted: Wed, 2005-08-10 11:46

LFrank, that worked great... thanks a ton.

www.troyandtina.com/gallery2

 
Erehwon
Erehwon's picture

Joined: 2004-01-16
Posts: 33
Posted: Wed, 2005-08-10 11:49
NickJensen wrote:
This theme is awesome! Thanks Pedro!

Just one question though, I saw someone ask it earlier but it didn't really get addressed, is it possible to add how many times each pic has been viewed? I'm no coder and looking through the Matrix theme tpls and trying to find out how to do this is a bit difficult.

If anyone could point me in the right direction that'd be great! :P

I think thats found @:

Site Admin --> Themes --> PGTheme --> Item Show/Hide Information

 
rpain
rpain's picture

Joined: 2005-04-07
Posts: 4
Posted: Wed, 2005-08-10 11:55

Error (ERROR_PERMISSION_DENIED) :
in modules/core/classes/helpers/GalleryUserHelper_medium.class at line 209 (gallerystatus::error)
in modules/core/classes/GalleryCoreApi.class at line 505 (galleryuserhelper_medium::assertsiteadministrator)
in modules/core/AdminThemes.inc at line 45 (gallerycoreapi::assertuserissiteadministrator)
in main.php at line 176 (adminthemescontroller::handlerequest)
in main.php at line 90
in main.php at line 82

I'm getting this when I want to save changes to the configuration. It's only in firefox, though. IE is fine - just thought I'd report the bug.

Thanks for a great job,

Richard