Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues
Author Message
Dawg
RavenNuke(tm) Development Team



Joined: Nov 07, 2003
Posts: 928

PostPosted: Mon Sep 21, 2009 11:47 am Reply with quote

Has anyone tried 2.4 with Gallery yet? I know we had some issues with 2.3. Will those fixes still work?

Dawg
 
View user's profile Send private message
fkelly
Former Moderator in Good Standing



Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Mon Sep 21, 2009 3:43 pm Reply with quote

I haven't had time to check it fully Dawg. Gallery still runs on my test site, fkelly.org that's 2.4 but there may be some funky things going on. Just haven't had time. FWIW, Gallery 3, which is still in beta, looks very promising. I have installed a non-integrated version on a site and it appears to do away with many of the "cumbersomeness" problems that have plagued the 2.x series. They seem to have stripped away a lot of "extra" code and simplified the permissions model that gave so many site admins headaches. Too early to recommend it except in test mode though.
 
View user's profile Send private message Visit poster's website
Dawg







PostPosted: Mon Sep 21, 2009 5:10 pm Reply with quote

I am hoping for some cool stuff out of 3.

Dawg
 
pugsley
New Member
New Member



Joined: Sep 17, 2009
Posts: 7
Location: Ohio, USA

PostPosted: Tue Sep 22, 2009 7:07 am Reply with quote

I have Gallery2 installed on v2.4 and don't currently have any issues.

On installation I had the "Your integration package is not up to date" issue, but I went into the database and dropped the nuke_g2 table, per the NukedGallery forums and that fixed the problem.
 
View user's profile Send private message
fkelly







PostPosted: Thu Oct 15, 2009 6:04 pm Reply with quote

I just started looking at this. Maybe I'm missing something but this looks like a nightmare to me. We changed the way that CSS files are loaded in the header.php in 2.4 and I don't think it's going to work for Gallery. The Gallery index.php does some trickery to try to load the appropriate css files before calling header.php but on my site at least that's not working either. It looks like a relative url type of problem.

We put hacks into mainfile and header.php to get Gallery to work with RN 2.3x. The mainfile hack just stopped the Gallery sidebar from loading as a block when Gallery was not the active module. The header hack tried to load the Gallery css. I'm not sure that second hack ever worked properly. If I run Gallery "natively" ... that is by the main.php program that comes in the Gallery directory rather than by the index.php that you use when loading Gallery as a RN module, it looks a lot better than run as a module. That's because (I believe) the style sheets are not getting loaded.

The RN 2.4 approach uses a constant called RN_MODULE_CSS to define where the CSS file for a module is located. You can see an example in modules/forums/nukebb.php. However, Gallery needs to load several css files and which ones they are can vary depending on which Gallery theme you are using. So I don't think RN_MODULE_CSS is going to work.

Pugsley, I've got to ask if you are running Gallery as a RN module or standalone. Could you point me to your site if you are running it as a module? PM me if you don't want to post the url here. I'd very much appreciate it.

I looked at the NukedGallery.net site again today. We are getting what we paid for it which is nothing. The nuke_g2 table just defines the links between Gallery and nuke and dropping it just means you are running Gallery as standalone ... I think but correct me I'm wrong.

We'll have to see what Gallery 3 brings and whether it will be easier to integrate. I'm leaning towards just running it standalone with a link prominently placed on the RN based home page. The only thing I think you'd lose is user integration but of my 1400 users maybe a half dozen actually do photo albums on the site and I could set them up by hand easier than I could maintain the integration mess that exists.
 
Palbin
Site Admin



Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania

PostPosted: Thu Oct 15, 2009 8:19 pm Reply with quote

Can't we just do an if statement, load the css/js our way, then include header.php instead of evaluating $header. I'll take a look at it.

_________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. 
View user's profile Send private message
fkelly







PostPosted: Thu Oct 15, 2009 8:47 pm Reply with quote

They (Gallery) load a series of css files (three I think). However, in experimenting a bit tonight I think I've localized the problem to the Ravenice theme. We still need to stick a couple lines into header.php to load the css files but that's the same as in 2.3.

I think the problem with Ravenice is that it encloses the Gallery area in a couple of divs that probably have font sizes that don't work with Gallery. With Deepblue and fisubice Gallery looks good on my test site with 2.4.

If it helps, the lines that need to go in header.php (in context) are:

Code:


   if (defined('RN_MODULE_CSS')) {
      $modCssFile = 'themes/' . $ThemeSel . '/style/' . RN_MODULE_CSS;
      if (file_exists($modCssFile)) {
         addCSSToHead($modCssFile, 'file');
      }
   }
   if (defined('G2HEADER_CSS_JS')) {
         echo "\n". G2HEADER_CSS_JS;
   }



I also quoted the standard addCSSToHead from our 2.4 code so you'd see where I'm thinking we need to add the code.

The gallery index.php does this:

Code:
    if (!empty($g2header_css_js)) {

       DEFINE ('G2HEADER_CSS_JS', $g2header_css_js);
    }


and the variable $g2header_css_js is derived from some internal machinations they do that are partly dependent on what Gallery theme you are using.

I'm not quite sure how to deal with the ravenice issue yet.
 
fkelly







PostPosted: Fri Oct 16, 2009 9:06 am Reply with quote

Looking further, Gallery works okay in themes with the two exceptions of Ravenice and CT_RN. Oh, the font sizes are a little small with Simply Blue also. I think all the css themes that use divs are causing the Gallery code to inherit a smaller font size than would be desirable. I looked a bit at modifying Ravenice to not generate certain divs where $name = gallery2 but it is not doing the trick. Due to the nature of "the cascade" it can be difficult to see where a font size is inherited from ... at least for me.

Don't have time to fiddle with this further now. Temporary solution is to not use these themes if (a) you don't like to squint and (b) you want to run Gallery. I'll try to post overall code for header.php and mainfile.php hacks next week after I have time to test further. Looks like Gallery will run just fine with 2.4 with the theme exceptions noted.
 
nuken
RavenNuke(tm) Development Team



Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina

PostPosted: Fri Oct 16, 2009 10:00 am Reply with quote

Good to hear that it is working.

_________________
Tricked Out News 
View user's profile Send private message Send e-mail Visit poster's website
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Fri Oct 16, 2009 4:07 pm Reply with quote

Note: is it worth seeing if RN_MODULE_CSS can point to a .php script? We do this on image src URLs for the captcha for instance. I was thinking it could pass back whatever CSS it wants to then...

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
fkelly







PostPosted: Fri Oct 16, 2009 7:12 pm Reply with quote

M. Gallery already has a pretty elaborate way of passing back the css files that are needed inside of head. Earlier in this thread I was thinking this wasn't working but upon further research I found out that it is. Gallery has to "look inside itself" (pardon the phrase) to find out what Gallery theme you are using and then determine which Gallery theme css file you need to load. I'm not sure there's any advantage to us in trying to interject RN_MODULE_CSS into this.

Right now the only remaining problem I see is trying to figure out how to modify the theme files in RN that use CSS and divs extensively to avoid tiny font sizes in Gallery. I'll have to look further next week as this weekend is shot.

Before I "go public" with recommended solutions I'll post something internally. I'm not sure if we should to with a custom mainfile, custom head approach or just tell people who use Gallery to modify the distribution files. But ... one step at a time. I need a couple of days to test all this and maybe even try it on my production site first.
 
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Sat Oct 17, 2009 1:24 am Reply with quote

It might be worth checking which CSS (the theme or Gallery) file is loaded last by looking at the source code output. A possible fix might must be to manually change (force) a different loading order.
 
View user's profile Send private message Send e-mail
fkelly







PostPosted: Sat Oct 17, 2009 7:48 am Reply with quote

Guardian, yes I moved the order around by loading it last but that didn't make any difference. I did some experiments to make sure that the Gallery theme was really being used and it was and is. The problem is that somewhere in our CSS based themes a font-size is being set and then inherited on down through the Gallery area but I'm not seeing exactly what to change ... and I don't want to change the normal classes in the theme because of possible adverse effects elsewhere. I'm thinking of adding a style to the themes, sort of like what was done with the Gcal styles and then wrapping the gallery area in a div that uses that style. That way I can break the inheritance chain but only in the case where $name == gallery2.

I'm also thinking of using the custom files capability both for my mainfile changes and the header area so that we aren't constantly overwriting the gallery changes when we upgrade RN. I just need a few hours to experiment and don't have them this weekend.
 
montego







PostPosted: Sat Oct 17, 2009 10:02 am Reply with quote

Will definitely await your solution fkelly. I just learned today that I will have a need for a gallery... just wish we had a really good one that is solidly *nuke compatible AND NSN Groups aware...
 
Guardian2003







PostPosted: Sat Oct 17, 2009 10:44 am Reply with quote

@ fkelly - I know what you mean about accidentally over writing changes, especially during an upgrade etc.
For anyone else reading this includes/custom_head.php is dynamically loading within the normal HTML HEAD tags, whilst includes/custom_header.php is loaded after the closing HEAD tag.
 
montego







PostPosted: Sat Oct 17, 2009 11:48 am Reply with quote

Sounds like a great wiki topic one of these days... "How to Insert Custom Code Without Getting Trounced Later".
 
NeapolitanWorld
Involved
Involved



Joined: Nov 06, 2005
Posts: 339
Location: Los Angeles, USA

PostPosted: Sat Oct 17, 2009 11:30 pm Reply with quote

Does anyone have this gallery running on RN to take a peak Very Happy
Btw PCN is back supporting coppermine. Looking forward to see where or if the gallery will evolve. I have seen G2 / G3 as a stand alone and on nuke sites and it seams very nice Cool

jc

_________________
My Raven Site Neapolitan Mastiff 
View user's profile Send private message
fkelly







PostPosted: Sun Oct 18, 2009 4:04 pm Reply with quote

So, I had a little time and built myself an includes/custom_files/custom_mainfile.php. The standard mainfile does this



At line 176. I cloned mainfile and put my changes into the blockfileinc function and saved it off to custom_files.

Now I get:

"Fatal error: Cannot redeclare get_lang() (previously declared in /mypath/public_html/html/mainfile.php:404) in /mypath/public_html/html/includes/custom_files/custom_mainfile.php on line 429"

That makes sense when I think of it. By cloning all of mainfile you are going to run everything twice. I'm now not sure what the thinking was when custom_mainfile was first thought of. One thing you might be able to do is put the conditional include of custom_mainfile right at the beginning of normal mainfile and wrap it in an if such that if custom_mainfile exists the rest of normal mainfile doesn't get executed. Where it is in mainfile now makes no sense to me. Is anyone else actually using custom_mainfile and if so how? What are you putting in it?

In other words,

Code:
if (file_exists(INCLUDE_PATH . 'includes/custom_files/custom_mainfile.php')) {

   include_once INCLUDE_PATH . 'includes/custom_files/custom_mainfile.php';
}
else {
... do normal mainfile logic
}

Then again if you do it this way I'm not sure what the advantage of having custom_mainfile is really.  If a new distribution comes out with revisions to mainfile you are still going to need to do a line by line comparison and put the changes that don't affect your customization into custom_mainfile.  Might be just as easy to run a comparison tool between the distribution mainfile and your version ... you just need to remember to do that before overwriting your code.
 
Guardian2003







PostPosted: Sun Oct 18, 2009 9:26 pm Reply with quote

I think the logic works the same way as the other custom files; they are really meant to be a way to add additional code to be executed rather than as 'replacement' code.

For custom_files to work as 'replacement' code we'd need to load those files first and wrap the original function with something like if(!function_exists))
Of course that wouldn't cater for code that isn't within a function though.
 
fkelly







PostPosted: Mon Oct 19, 2009 8:37 am Reply with quote

Thanks for the clarification. In this case I can really see no reason to use the custom file. I will post a Mantis issue to see if I can get clearance to just build the code right into the distribution. If gallery isn't loaded it will do no harm and if it is it should work properly.
 
fkelly







PostPosted: Tue Oct 20, 2009 8:31 am Reply with quote

Here is an additional "hack" that represents work in progress ... if anyone else wants to try this out. I will post final when I have done more testing. If you use this provisional hack be sure to back up your files first.

Problem: The Gallery pages in certain Ravennuke themes that are CSS based have a very tiny font size.

Analysis: at least for the Matrix Gallery theme that I use, the #gallery id that encapsulates the gallery text has a font-size of 65%. In the Ravenice theme the body style has a font-size of 10px and I think the other relevant divs inherit their font-sizes from this. So you wind up with a pretty small font.

In Ravenice theme.php, in themeheader after the NukeNav section has been echoed out it does this:

Code:
   echo '</div>

      </div></div>
      <div id="content">';

   global $hide_blocks_left;


I have modified it to do this:
Code:
   echo '</div>

      </div></div>';
      if ($name == 'gallery2') {
         echo '<div id="gallery-content">';
         }
         else {
            echo '<div id="content">';
            }
   global $hide_blocks_left;


Then I modified Ravenice/style/style.css to have the following class:

Code:
#gallery-content {

  clear: both;
  float: left;
  width: 100%;
  padding-top: 15px;
  font-size: 1.5em;
}


I put the #gallery-content right after the #content id.

The result is that the font-size inheritance "chain" that is dependent on body for most pages is broken and you can start with a 1.5 em font-size. Feel free to modify that size for your tastes.

I think that SimplyBlue and CT_RN have similar problems. Once I work them all out and get reactions here I will post the final solutions in our Wiki page.

Note: this solution is only for RN 2.4 and up. I have not tested it elsewhere.
 
chaos_coa
Regular
Regular



Joined: Oct 11, 2007
Posts: 86

PostPosted: Sun Nov 20, 2011 2:39 pm Reply with quote

Hi

I am working on getting gallery2 working in RN 2.40.

Gallery 2 displays properly in standalone mode.

Here is a screenshot:
[ Only registered users can see links on this board! Get registered or login! ]


When viewed as integrated the gallery loses its formatting and looks like what you see in this screenshot:

[ Only registered users can see links on this board! Get registered or login! ]


My gallery2 theme is Siriux

My site uses a theme purchased by clan themes.

I have read this thread and this one on RN:
[ Only registered users can see links on this board! Get registered or login! ]


I am not clear what I need to do to fix the issue?


In addition to the formatting issues mentioned above - the gallery plugins page does not display properly when embedded in RN. I had to make all my changes in standalone mode which I guess is ok since I rarely make a change there. Just thought I would mention it.


Is this something you cam help me with here?

or do I need to contact clanthemes?
 
View user's profile Send private message
chaos_coa







PostPosted: Fri Dec 16, 2011 1:07 pm Reply with quote

or is this what I need to do?
[ Only registered users can see links on this board! Get registered or login! ]

Your help will be greatly appreciated?
 
chaos_coa







PostPosted: Fri Dec 16, 2011 1:09 pm Reply with quote

Whoops! Dupe Post
 
Dawg







PostPosted: Fri Dec 16, 2011 8:02 pm Reply with quote

Chaos,

If I recall correctly yes. It has been a while since I did it....

Dawg
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues

View next topic
View previous topic
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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©