Support Forums | Demo Gallery [1.x] [2.x] | Downloads | News | Site Map ]
Nuked Gallery
  Create a FREE account or Login   As a guest, you don't have access to our FULL navigation system.
 Forum FAQForum FAQ   StatisticsStatistics   SearchSearch   UsergroupsUsergroups   FavoritesFavorites  

Theme problem with latest RavenNuke

 
Post new topic   Reply to topic    NukedGallery.net Forum Index » PHP-Nuke Integration » Gallery 2 Integration View previous topicPrinter friendly versionView next topic
Author Message
zeromechanic

Beginner
Beginner


Joined: Jan 19, 2008
Posts: 6

PostPosted: Fri Oct 24, 2008 4:05 pm    Post subject: Theme problem with latest RavenNuke Reply with quote

Hello,

Just installed the latest gallery (2.3) under the latest RavenNuke.
Everything worked perfect, the integration works.
(updated the dbase from an older version, installed just the new version and kept the original dbase))
But the the theme is not working.(using the matrix)

everything is displayed, but not the theme graphics/templates.

When i try the standalone, the theme is displayed correct.

Can anyone point me in the right direction to get this right?

RavenNuke link:
http://www.zeromechanic.nl/modules.php?name=gallery2

Standalone :
http://www.zeromechanic.nl/modules/gallery2/main.php


Last edited by zeromechanic on Tue Oct 28, 2008 5:49 pm; edited 1 time in total
Back to top
Offline View user's profile Send private message
AdBot
   Post subject: Theme problem with latest RavenNuke  

Back to top
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6284
Location: Washington Township, NJ, USA

PostPosted: Sat Oct 25, 2008 8:58 am    Post subject: Re: Theme problem Reply with quote

what are your integration settings from the nuke admin panel?
_________________
Back to top
Offline View user's profile Send private message Visit poster's website
zeromechanic

Beginner
Beginner


Joined: Jan 19, 2008
Posts: 6

PostPosted: Sun Oct 26, 2008 5:46 am    Post subject: Re: Theme problem Reply with quote

screenshot :
Back to top
Offline View user's profile Send private message
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6284
Location: Washington Township, NJ, USA

PostPosted: Mon Oct 27, 2008 7:10 am    Post subject: Re: Theme problem Reply with quote

hmm..this is the second ravennuke issue in a month or so.

looking at the HTML source from your pages, I can see why. The ravennuke page isn't including the G2 CSS file. This has been encountered before, and I've hacked the integration to work with it.

my guess is that it's failing around line 246 of modules/gallery2/index.php:
Code: ›   246             if (strstr($line, "<head")) {
  247                 foreach($css as $stylesheet) {
  248                     $links = $stylesheet;
  249                     $links = str_replace('"', '\"', $links);
  250                     $header .= 'echo "' . $links. '\n";' . "\n";
  251                 }


unfortunately, i'm awaiting the impending birth of twin daughters and don't have much time on my hands right now to tinker with this. if you're good w/ PHP code, please try to work on this, and possibly find a fix. thanks Smile
_________________
Back to top
Offline View user's profile Send private message Visit poster's website
zeromechanic

Beginner
Beginner


Joined: Jan 19, 2008
Posts: 6

PostPosted: Mon Oct 27, 2008 2:58 pm    Post subject: Re: Theme problem Reply with quote

Ok thnx,
I wil look into this
If it works, or if i find another solution I'll post it.
I now know where to look.

This is the second "problem"with the latest RN.
Earlier had a problem with the phpbb3 bridge.
I posted a "fix" over there at the forums (osc2nuke.com).


Spend the most time that you have with the kids when they arrive.
For now congratulations with the twins Very Happy
Back to top
Offline View user's profile Send private message
zeromechanic

Beginner
Beginner


Joined: Jan 19, 2008
Posts: 6

PostPosted: Tue Oct 28, 2008 4:23 pm    Post subject: Re: Theme problem Reply with quote

Found the problem whats causing this.

Compared my previous version with the latest version of RN
(always make a backup when up-grading/dating Wink Wink Wink )

in header.php in the latest version is added/changed :
Code: › if (file_exists('includes/mimetype.php')) include('includes/mimetype.php');
   elseif (file_exists('../includes/mimetype.php')) include('../includes/mimetype.php');
   else {
      header('Content-Type: ' . _MIME . ';charset=' . _CHARSET);
      header('Vary: Accept');
      /***echo '<?xml version="1.0" encoding="' . _MIME . '"?>';***/
      echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
      echo '<html xmlns="http://www.w3.org/1999/xhtml" lang="en">', "\n";
      echo '<head>', "\n";
   }


In the original version of RN2.30, the mimetype.php excists in the includes folder.
This was not used in the previous version of RN
In this case the echo 'head', "\n"; is not loaded through the header.php as stated in the index.php of the gallery integration because of the "if then else" statement added in the header.php.
This is causing the gallery css not to load.

After renaming the mimetype.php, making the file_exists statement false to force the else statement with the <head in header.php
The full css was loaded and everything is displayed in the integrated version.

This for other users that run into this problem.
This is a quickfix. RN did put this in for a reason.
I will post this "problem" also at the raven site.

Dari, thanx for pointing me to the right direction.
Back to top
Offline View user's profile Send private message
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6284
Location: Washington Township, NJ, USA

PostPosted: Wed Oct 29, 2008 6:21 am    Post subject: Re: Theme problem with latest RavenNuke Reply with quote

ah...so the mimetype.php file is what's dumping the head tag in the HTML, not the header.php file.

does ravennuke have some unique variable that i can use as a trigger? nuke evolution uses NUKE_EVO (you can see it in the integration code on line 123 at http://gallery.svn.sourceforge.net/view ... iew=markup ).
_________________
Back to top
Offline View user's profile Send private message Visit poster's website
fkelly

Novice
Novice


Joined: Dec 03, 2005
Posts: 28

PostPosted: Wed Oct 29, 2008 1:29 pm    Post subject: Re: Theme problem with latest RavenNuke Reply with quote

Yes, it is mimetype that is causing this. You can see Raven's suggestion over at http://ravenphpscripts.com/posts16565-highlight-.html [ravenphpscripts.com]

However I'm not sure this is the full solution for the NukedGallery index.php. I just tried zeromechanics suggestion about renaming mimetype.php. The one problem that I can confirm happens ALL THE TIME with RN2.30 and the embedded Gallery is that when you go to site admin and then themes you don't get any entries in the drop down boxes. I also see periodic problems with the display of slideshows.

It looks like you always include mainfile.php if NUKE_EVO is not defined. If so, then when the Ravennuke 2.30 mainfile is included a variable named $Version_Num will be read in from the nuke_config table and have the value:
"'rn2.30.00" in it. So you could test for this. Probably it would make sense to just test for => rn2.30 in the first five positions because there could possibly be a 2.30.01 release and sometime down the road there will probably be a 2.4 release.

If you would like a fully copy of the RN2.30 header.php and mimetype.php I can provide it (email, pm or post here? ). Your choice if you want it at all.
Back to top
Offline View user's profile Send private message
fkelly

Novice
Novice


Joined: Dec 03, 2005
Posts: 28

PostPosted: Fri Nov 14, 2008 9:48 am    Post subject: Re: Theme problem with latest RavenNuke Reply with quote

I have been working on a version of the integration index.php for Ravennuke. In my opinion, the current approach of parsing the header.php file looking for <head is really unnecessary and wasteful and needlessly complicated. What we really need to do is get the list of the css and js files for the appropriate theme and put the includes for them into a variable, then have header.php in Ravennuke include the files that correspond to that variable when it's set. (I had been working on an approach of parsing mimetype.php too but that is even more complicated and unnecessary).

The problem I am having is that the headHtml "variable" which gets passed to GalleryEmbed::parseHead($g2moddata['headHtml'] is blank. So I am not getting back a list of css files nor js ones. I can put echoes everywhere, in index.php and in the parsehead function and I see nothing in headHtml. This appears to work erratically but I can't figure out what the determining factor is.

Edit: my mistake ... headHtml needs to be wrapped in htmlentities to display it in an echo. I have my fix ready and will post it over at Ravennuke. If I can get a few people to test it there and iron any kinks out I will post it back here too.
Back to top
Offline View user's profile Send private message
fkelly

Novice
Novice


Joined: Dec 03, 2005
Posts: 28

PostPosted: Wed Nov 19, 2008 2:50 pm    Post subject: Re: Theme problem with latest RavenNuke Reply with quote

I have posted new code on the ravenphpscripts site and will post it here to. This replaces the integration index.php entirely and the header.php file for Ravennuke 2.3. Please note the version number. The full explanation is at:

http://ravenphpscripts.com/posts16683-highlight-.html [ravenphpscripts.com]

Basically I have replaced the approach of parsing header.php and looking for the string <header with what should be a more reliable and efficient approach. I believe this approach should work for all *nuke distributions but I will leave that up to others to determine. It has been tested with RN 2.30 only and with Gallery 2.2.6 and 2.3.

Oh heck. I was going to post the full code inside of code blocks here but I get the "html tags are not permitted" error message. Go over to Ravenphpscripts instead at the url listed to get the code and read further.
Back to top
Offline View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    NukedGallery.net Forum Index » PHP-Nuke Integration » Gallery 2 Integration View previous topicPrinter friendly versionView next topic

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours

Powered by phpBB © phpBB Group



Sponsors: Web HostingDedicated ServersDomain NamesDomain Name RegistrationDedicated Web HostingSEO Search Engine OptimisationSEOWeb Design New YorkSEO Web DesignWeb hosting AustraliaCheap Web Design

6th year online! 2003-2009
Legal • Use of this site consitutes agreement to the Acceptable Use Policy
Hosted by Implosion WorksSourceForge.net Logo • Theme by TonicMedia