singapore: the smallest big galery
home » forum » Templates » Drop photo title from crumbline

You are not logged in.

#1 2007-04-04 05:41:05

jc924
Member

Drop photo title from crumbline

Does anyone know how to remove the title of the photo from the crumbline. I would like the crumbline to end with the gallery title.

Thanks

Offline

 

#2 2007-04-04 15:41:31

Paul
Member

Re: Drop photo title from crumbline

I think the file you'll want to edit is header.tpl.php

Offline

 

#3 2007-04-05 05:29:47

jc924
Member

Re: Drop photo title from crumbline

I've studied that file, and unless I am missing something, I don't think that is the correct file to make this edit.

Offline

 

#4 2007-04-05 07:10:38

jonny
Member

Re: Drop photo title from crumbline

look in singapore.class.php within the includes directory.
the crumbline functions are in there.

you probably want to comment out this line

Code:

if($this->isImagePage()) $crumb[] = $this->image;

but I havent tried it so if it isnt then you might like to have a look in that area.

Offline

 

#5 2007-04-06 05:29:12

jc924
Member

Re: Drop photo title from crumbline

Ok, I think the line I should edit is: if($this->isImage() && $this->imageName()!="")
      return $this->imageName();

But I can only get it to return other text. I cannot figure out how to drop the image name.

Offline

 

#6 2007-08-10 00:16:02

DC
Administrator

Re: Drop photo title from crumbline

I know im a little late at this post but if you still want to  try somthing? I wrote a mod that allows me to chop off the text if its too long it also reformats it a tad as well ...

So what if you use this section of what I wrote.
you can edit this directly into the header template no need to go playing in singapore class as this takes what that class sends it and mods it as needed... this should give you the flexability to have it show what you want by modifying it a bit if you need to.

you can try my mod just after this line in the header.tpl.php file

echo $sg->templateFlipper();


//DC Crumb Mod ...
$crumb = $sg->crumbLine();

$cline  = explode(">", $crumb);//DC Check Crumbs
$lastcr = substr($crumb,strrpos($crumb,">"));

if (!$cline[1]){
$crumbs = "$cline[0]";
}else
if ($cline[2]){
$crumbs = "You are here: $cline[1]";
}else{
$crumbs = "$cline[0]$lastcr";
}
$crumbs = ucwords($crumbs);


Then where your divs are change the one div so it looks like this ...

<div id="crumb" class="crumb"><?php echo $crumbs; ?></div>


DC

Last edited by DC (2007-08-10 00:17:34)


To code or not to code that is the question?

Did my response help you out? Consider donating by buying me a slice, Whats this? Read More!
http://www.clickcraft.net/slice.php

Offline

 

#7 2009-02-11 19:22:35

steliosk
Member

Re: Drop photo title from crumbline

there is another way to short out the image name in the crumbline keeping the number only.

most of the images contain the word IMG or DSC (depending on the camera's brand) and the "copy" word at the end (if image was post processed)

simply edit singapore.class.php line 471 somewhere
and replace the code
$ret .= $crumbArray[$i]->nameForce();

with
$ret .= str_replace("IMG","",str_replace("copy","",$crumbArray[$i]->nameForce()));


IMG word can be changed to whatever.

Offline

 

#8 2009-02-11 20:27:20

DC
Administrator

Re: Drop photo title from crumbline

I think my slightly more complex auto re-formating method may be a little more fool proof as it does not rely on any exact name matches to pull of the trick ...

DC


To code or not to code that is the question?

Did my response help you out? Consider donating by buying me a slice, Whats this? Read More!
http://www.clickcraft.net/slice.php

Offline

 

#9 2009-02-11 21:49:40

steliosk
Member

Re: Drop photo title from crumbline

well, I haven't tried your script here, because I managed to change what I've wanted with the method I posted.

My images have specific pattern and all I want to wipe out is the "IMG" (canon user) and the "copy" word at the end.

Have a look <a href="http://www.stelioskritikakis.com/gallery/index.php">here</a>

Offline

 

#10 2009-02-11 23:35:08

DC
Administrator

Re: Drop photo title from crumbline

Impressive Imagery, ok so I see the number ok then yes yours is being used for a slightly dif purpose as your keeping a number.

I think the others wanted nothing, just to remove any name completely thats how mine works.

FYI are you aware you have 2 sets of head tags in your docs?
it looks like you have the SGAL header and you have the WP header as well ...

DC


To code or not to code that is the question?

Did my response help you out? Consider donating by buying me a slice, Whats this? Read More!
http://www.clickcraft.net/slice.php

Offline