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.3 RN Issues
Author Message
Dawg
RavenNuke(tm) Development Team



Joined: Nov 07, 2003
Posts: 928

PostPosted: Fri Jun 19, 2009 5:27 am Reply with quote

As ya'll know we have header issues between Rn and Gallery.

If you don't know what I am talking about see this thread... [ Only registered users can see links on this board! Get registered or login! ]

After I got it all up and running....Of coarse I wanted my PAge Titles to work correctly so I went to Nuked Gallery and tried everything I saw there. Nothing worked. All I got was the default Module Name.

SOOOoooo....I fixed it....Kinda...

In Galleries Index file....you have the var pagetitle
Code:
    if($title != "") { 

        $pagetitle = "» ".trim($title);
    }


So I went to incluides/dynamic_titles.php and added....
Code:
// gallery 

if($name=="gallery"){
   $newpagetitle = "$pagetitle";
   }


The problem with this is you wind up with "&raquo" in the title....So I went back to galleries index and removed it....
Code:
    if($title != "") { 

        $pagetitle = trim($title);
    }


I still have 1 "&raquo" at the start of the title that needs to be removed. How do I strip this for the var?

Thanks for your help and if I am going about this in the wrong way...Please let me know.

Dawg
 
View user's profile Send private message
montego
Site Admin



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

PostPosted: Fri Jun 19, 2009 6:44 am Reply with quote

I wouldn't even bother changing the Gallery index.php script. Instead, within the new code you added to DT, just use str_replace or preg_replace to replace all occurrences of "&raquo" from your title before leaving that code..

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







PostPosted: Fri Jun 19, 2009 7:43 am Reply with quote

Montego,
How would I go about just trimming the first one?

It comes out like >>Gallery Name>>Album Name>>Photo Title

I do not mind the rest of them....I just want to get rid of the First one.

Thank You for your help!

Dawg
 
sexycoder
Spammer and overall low life



Joined: Feb 02, 2009
Posts: 82

PostPosted: Fri Jun 19, 2009 7:51 am Reply with quote

Where can I download this Gallery for Raven Nuke. Is it validate it and compatible with RN?
 
View user's profile Send private message
Dawg







PostPosted: Fri Jun 19, 2009 8:07 am Reply with quote

Download and install Gallery to your modules dir
[ Only registered users can see links on this board! Get registered or login! ]

Once it is installed download and install the intergration package here
[ Only registered users can see links on this board! Get registered or login! ]

Then over write the files in this thread... [ Only registered users can see links on this board! Get registered or login! ]

and youa re ready to go.

Dawg
 
sexycoder







PostPosted: Fri Jun 19, 2009 2:57 pm Reply with quote

Thanks Dawg. I will check it out. I will test it and see how it goes.
 
misterpat
Hangin' Around



Joined: Mar 02, 2009
Posts: 48

PostPosted: Mon Jun 22, 2009 6:45 pm Reply with quote

Dawg,

I dont know if this will help you in what your trying to do, but I did something similar to what your doing.

I posted it on Montego's site.
[ Only registered users can see links on this board! Get registered or login! ]
 
View user's profile Send private message
Dawg







PostPosted: Mon Jun 22, 2009 7:00 pm Reply with quote

misterpat,

What I did instead of moving the database and bla bla bla.....was I went into the gallery index and tapped into the var $pagetitle

I am grabbing it with this in includes/dynamic_tiles.php....
Code:
// gallery 

if($name=="gallery"){
    $name = "$pagetitle";
    $newpagetitle = "$name";
}


Thanks for the suggestion!

Dawg
 
draxx
Involved
Involved



Joined: Nov 19, 2003
Posts: 282

PostPosted: Mon Jun 22, 2009 9:13 pm Reply with quote

Ohhhh Dawg I wish I had your skillz.

I'm stealing your modifications Smile Smile Smile (yet again) Wink This is what I hated about Gallery2 also.

But hey - dont get too attached - they have Gallery3 now - it looks very cool ... and they will eventually integrate it. (I asked)
 
View user's profile Send private message
Dawg







PostPosted: Tue Jun 23, 2009 2:33 am Reply with quote

Draxx,
I have no skillz. The RN team has taught, helped and held my hand many many many times. I just know what i want and I sit down and make it and then when it doesn't work as expected I ask for help.

I have looked at G3. My guess is I will be on G2 for a long while yet.

Dawg
 
fkelly
Former Moderator in Good Standing



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

PostPosted: Tue Jun 23, 2009 7:11 am Reply with quote

Quote:
they have Gallery3 now - it looks very cool ... and they will eventually integrate it. (I asked)


I've become a skeptic on all these integrations of large products (PHPBB as well as Gallery). If you look at the NukedGallery site (where Gallery Integration into Nuke is supported) you will see that it is dead in the water. I posted some fixes that help Gallery 2.x work with RN but I am far from an expert with Gallery code and don't have time to specialize in this stuff. Unless the core developers for a product really commit to an integration I don't see how it happens on a reliable and ongoing basis. And I don't see that happening ... why after all should they?

I am thinking instead of experimenting with standalone installations of these products (Gallery looks much better and runs better that way) and just put a link to them within my RN sites. Yes, that creates the problem of dual or even triplicate user databases but in Gallery at least you don't need to be a user unless you are going to be a Gallery album owner. Only a small percentage of my users do that.
 
View user's profile Send private message Visit poster's website
Dawg







PostPosted: Tue Jun 23, 2009 9:24 am Reply with quote

FKelly,
I disagree with you on this one. I think the intergreation is a MUST have. IF you look at sites like mine, I have over 12000 photos in 1000 or so albums. Managing that outside of Nuke would be a MAJOR hassle. To me that is one of the BIG draws about using Nuke vs some other CMS's

I have never understood why the whole photo thing was such a big deal. I have never heard of an exploit other than .gifs. So we are dealing with users and permissions. I can not understand why having a user gallery is so hard to do. All the skills on the RN team I bet it would be pretty easy to do.

Didn't I hear something about Raven picking up Coopermine?

Dawg
 
fkelly







PostPosted: Tue Jun 23, 2009 9:36 am Reply with quote

Dawg: I haven't tried managing a big Gallery outside of Nuke so I can't say definitively. If you had 1000 users in your Nuke user base and 300 or 500 of them created albums I could see where you have a point. In my case I have 1700 users but maybe a dozen have created albums ... so duplicating and creating that many users over in the Gallery side is not that much of an issue. But it is dependent on your situation.

There are plenty of skills on the RN team, that is true. What there is not a lot of is free time. As to it being simple ... well while we certainly don't need anything nearly as complex as the Menalto Gallery, take a look at their code base some time. I would not be surprised if hundreds of person years of efforts have gone into that thing as well as a ton of expertise. Personally I would just as soon not reinvent their wheel. I have similar opinions with regard to ZenCart and inventing our own Paypal module. If we had limitless resources my opinions would be different but we don't and they aren't.
 
Dawg







PostPosted: Mon Jul 27, 2009 8:22 am Reply with quote

I had to upgrade Gallery and I thought I would revisit this....

WE have to change 3 files to get it right....

modules/gallery2/index.php....

find where is says....
// G2 Header hacking (contribution from dmolavi)
and change it to this....

Code:
    $title = ''; $javascript = array();    $css = array(); 


    if (isset($g2moddata['headHtml'])) {   
            list($title, $css, $javascript) = GalleryEmbed::parseHead($g2moddata['headHtml']);
    }
    if($title != "") {
        $pagetitle = trim($title);
    }
    $g2header_css_js = '';
    foreach($css as $stylesheet) {
          $g2header_css_js .= $stylesheet . "\n";
     }
     foreach($javascript as $script) {
           $g2header_css_js .= $script. "\n";
    }

    if (!empty($g2header_css_js)) {
        DEFINE ('G2HEADER_CSS_JS', $g2header_css_js);
    }


Then open your theme....
modules/gallery2/themes/matrix/templates/local/theme.tpl
find <title> and change it to this....
Code:
<title>{if isset($separator)} {$separator} {/if} 

  {foreach name=parent from=$theme.parents item=parent}
  {if !$smarty.foreach.parent.last}
      {$parent.title|markup:strip|default:$parent.pathComponent}
  {else}
     &raquo; {$parent.title|markup:strip|default:$parent.pathComponent}
  {/if}
  {if isset($separator)} {$separator} {/if}
  {/foreach}
  {if ($theme.pageType == 'admin' || $theme.pageType == 'module')}
  {else}
      &raquo; {$theme.item.title|markup:strip|default:$theme.item.pathComponent}
  {/if}</title>


Then open includes/dynamic_titles.php

and add this....
Code:
// gallery 

if($name=="gallery2"){
    $name = "$pagetitle";
    $newpagetitle = "$name";
}


That should give you full crumbtrails for your page title.

Smile

Dawg
 
Dawg







PostPosted: Mon Jul 27, 2009 10:43 am Reply with quote

This will remove the 1st << from the title....

Add it at the bottom of DT (PHP5)

Code:
$newpagetitle = preg_replace('/&raquo;/', '', $newpagetitle, 1);
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.3 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 ©