Author |
Message |
Dawg
RavenNuke(tm) Development Team

Joined: Nov 07, 2003
Posts: 928
|
Posted:
Fri Jun 19, 2009 5:27 am |
|
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...
http://www.ravenphpscripts.com/posts16683-highlight-.html
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 "»" in the title....So I went back to galleries index and removed it....
Code: if($title != "") {
$pagetitle = trim($title);
}
|
I still have 1 "»" 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 |
|
|
|
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Fri Jun 19, 2009 6:44 am |
|
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 "»" from your title before leaving that code.. |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
 |
Dawg

|
Posted:
Fri Jun 19, 2009 7:43 am |
|
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
|
Posted:
Fri Jun 19, 2009 7:51 am |
|
Where can I download this Gallery for Raven Nuke. Is it validate it and compatible with RN? |
|
|
|
 |
Dawg

|
Posted:
Fri Jun 19, 2009 8:07 am |
|
|
|
 |
sexycoder

|
Posted:
Fri Jun 19, 2009 2:57 pm |
|
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
|
Posted:
Mon Jun 22, 2009 6:45 pm |
|
|
|
 |
Dawg

|
Posted:
Mon Jun 22, 2009 7:00 pm |
|
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


Joined: Nov 19, 2003
Posts: 282
|
Posted:
Mon Jun 22, 2009 9:13 pm |
|
Ohhhh Dawg I wish I had your skillz.
I'm stealing your modifications (yet again) 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) |
|
|
|
 |
Dawg

|
Posted:
Tue Jun 23, 2009 2:33 am |
|
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
|
Posted:
Tue Jun 23, 2009 7:11 am |
|
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. |
|
|
|
 |
Dawg

|
Posted:
Tue Jun 23, 2009 9:24 am |
|
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

|
Posted:
Tue Jun 23, 2009 9:36 am |
|
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

|
Posted:
Mon Jul 27, 2009 8:22 am |
|
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}
» {$parent.title|markup:strip|default:$parent.pathComponent}
{/if}
{if isset($separator)} {$separator} {/if}
{/foreach}
{if ($theme.pageType == 'admin' || $theme.pageType == 'module')}
{else}
» {$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.
Dawg |
|
|
|
 |
Dawg

|
Posted:
Mon Jul 27, 2009 10:43 am |
|
This will remove the 1st << from the title....
Add it at the bottom of DT (PHP5)
Code:$newpagetitle = preg_replace('/»/', '', $newpagetitle, 1);
|
|
|
|
|
 |
|