Page 1 of 2
Using the images in the cataloger [Solved!!!]
Posted: Sun Jun 29, 2008 12:47 am
by JeremyBASS
Here is a template that make it so that the image of the category_items only shows onmouseover...
Here is the example:
https://www.sjrmc.org/Core/DoctorDirectory/Anesthesiology
Code: Select all
{$notes}
<div class="category_items">
{if $hasnav == 1}
<div class="catnav">{$prev}{$navstr}{$next}</div>
{/if}
<ul id="CHERClist" style="line-height:13px; font-size:16px; vertical-align:top; float:left;">
{section name=numloop loop=$items}
<li><a href="{$items[numloop].link}" onmouseover="updateDivs('{$items[numloop].imagename}')" target="_self" onMouseDown="javascript:toggleDiv('hideMe3')">{$items[numloop].title}</a></li>
{/section}
</ul>
<div id="image-switch" class="image-switch">
<div style="line-height:13px; font-size:16px; vertical-align:top;">
<div id="Blank" style="display:block;"></div>
{section name=numloop loop=$items}
<div id="{$items[numloop].imagename}"style="display:none;"><img src="uploads/images/catalog/{$items[numloop].imagename}.jpg" title="{$items[numloop].title}" alt="{$items[numloop].title}"/></div>
{/section}
</div></div></div><div style="clear:right;"></div> {if $hasnav == 1}
<div class="catnav">{$prev}{$navstr}{$next}</div>
{/if}
What is the issues is that i can't seem to get the images that are created after up loading them to populate the right areas... what i did for the now to get it mostly functioning is making a User-Defined Attribute call imagename and have been manually entering them in for the testing porpoises... but now i need to get this end to work... any ideas...? I know that the help says
item name - this is the alias of the item/category page containing the image.
image type - this is a designation for image type:
f - item full-size image
t - item thumbnail
cf - category full-sized image
ct - category thumbnail
ctf - printable catalog full-sized image
image number - so a given item/catalog/etc can have multiple images
long dimension - long dimension of the image, in pixels
missing flag - 1 if you want to show an "image missing" image if this image doesn't exist, 0 otherwise
This will take an image in root_path/uploads/images/catalog_src/itemname_src_1
but I'm just not sure what to do, as i have not gotten it to work yet...
The goal is to uses the thumb in this area...
div id="{$items[numloop].THE NEEDED IAMGE}"style="display:none;">
any help here would be great... thanks...
jeremyBass
Re: Using the images in the cataloger
Posted: Mon Jul 07, 2008 8:53 pm
by JeremyBASS
Does any one know how to do this?.... any help wold be great here.... thank you
I just need to fix this:
div id="{$items[numloop].THE NEEDED IAMGE}"style="display:none;">
this was one try... hopefully some will get what I need her.... thanks for the help...
sample:
************edit**************
I thought that this would be clearer ... what i need is to find out what the Page Alias of the children items of the parent page currently on...

hope that is clearer...
Re: Using the images in the cataloger
Posted: Sun Jul 20, 2008 8:16 pm
by JeremyBASS
Hello, this one I'm not sure if I'm being clear on what is needed... It should be easy... I want the page alais of the Item page in the catagory page...
sample:
if the reason why noone is responding is due to not knowing, I don't know if the post would help here either...
This Posting "Re: Limit Menu Items"... it's something... lol...thanks for the help
jeremyBass
Re: Using the images in the cataloger
Posted: Tue Jul 22, 2008 3:49 pm
by JeremyBASS
Thanks for the help here... you'r on the right track I'd say...
tried it out... not sure if I'm doing it right ...
this is the two ways I tried
Code: Select all
/////////////////////////////////////////////////////
/////////////////////////////////AND THIS IS ONE
/////////////////////////////////////////////////////
<li>
<a name="staticLink" href="{$items[numloop].link}" class="tooltip" title="{if $items[numloop].imagename == true}
<img src='{root_url}/uploads/images/catalog/{$thisone.link|regex_replace:"/.*\//":""}_t_1_100_1.jpg' title='{$items[numloop].title}' alt='{$items[numloop].title}' style='padding-right:30px; margin-top:10px;'/><br/>
{$items[numloop].title},<br/> {$items[numloop].nametitle}" target="_self" onMouseDown="javascript:toggleDiv('hideMe3')">{$items[numloop].title}, {$items[numloop].nametitle}</a>
</li>
/////////////////////////////////////////////////////
/////////////////////////////////AND THIS IS TWO
/////////////////////////////////////////////////////
<li>
<a name="staticLink" href="{$items[numloop].link}" class="tooltip" title="{if $items[numloop].imagename == true}
<img src='{$items[numloop].link|regex_replace:"/.*\//":""}_t_1_100_1.jpg' title='{$items[numloop].title}' alt='{$items[numloop].title}' style='padding-right:30px; margin-top:10px;'/><br/>
{$items[numloop].title},<br/> {$items[numloop].nametitle}" target="_self" onMouseDown="javascript:toggleDiv('hideMe3')">{$items[numloop].title}, {$items[numloop].nametitle}</a>
</li>
both always come out like this
Code: Select all
<li>
<a name="staticLink" href="https://www.sjrmc.org/DoctorDirectory/Dir_Anesthesia/larry-davis/" class="tooltip" title="<img src='https://www.sjrmc.org/uploads/images/catalog/_t_1_100_1.jpg' title='Larry Davis' alt='Larry Davis' style='padding-right:30px; margin-top:10px;'/>
<br/>
Larry Davis,<br/> MD" target="_self" onMouseDown="javascript:toggleDiv('hideMe3')">Larry Davis, MD</a>
</li>
and it should be like this
Code: Select all
<li>
<a name="staticLink" href="https://www.sjrmc.org/DoctorDirectory/Dir_Anesthesia/larry-davis/" class="tooltip" title="<img src='https://www.sjrmc.org/uploads/images/catalog/larry-davis_t_1_100_1.jpg' title='Larry Davis' alt='Larry Davis' style='padding-right:30px; margin-top:10px;'/>
<br/>
Larry Davis,<br/> MD" target="_self" onMouseDown="javascript:toggleDiv('hideMe3')">Larry Davis, MD</a>
</li>
it's missing the key part to the whole thing... in this case larry-davis... any ideas on why?... thanks again for the help here.
jeremyBass
Re: Using the images in the cataloger
Posted: Tue Jul 22, 2008 6:36 pm
by JeremyBASS
Pimpin... still had to use the src='{root_url}/uploads/images/catalog/...' with it... but my oh my it's good to go... thanks for the help here... It's nice to finaly get to put [solved] on this
jeremyBass
the full code
Code: Select all
<a name="staticLink" href="{$items[numloop].link}" class="tooltip" title="{if $items[numloop].imagename == true}<img src='{root_url}/uploads/images/catalog/{$items[numloop].link|regex_replace:"/.*\/(.*)\//":"\\1"}_t_1_100_1.jpg' title='{$items[numloop].title}' alt='{$items[numloop].title}' style='padding-right:30px; margin-top:10px;'/><br/>{/if}{if $items[numloop].centerlocation == true}<span class='loca'>{$items[numloop].centerlocation}</span>{/if}<br/>
{$items[numloop].title},<br/> {$items[numloop].nametitle}" target="_self" onMouseDown="javascript:toggleDiv('hideMe3')">{$items[numloop].title}, {$items[numloop].nametitle}</a>
side note... think you may-be able to pipe in on this?
http://forum.cmsmadesimple.org/index.ph ... 568.0.html
it too has been a stumper... thanks again..

Re: Using the images in the cataloger [NOT_solved]
Posted: Tue Jul 22, 2008 11:06 pm
by JeremyBASS
I spoke to soon... Although that did what i needed... I still could n't get the imagename field gone for good.... and that was to whole point...
this is what I was trying... ideas?
Code: Select all
{section name=numloop loop=$items}
<li>
{assign var="image"
value="(root_url)/uploads/images/catalog/($items[numloop].link|regex_replace:"/.*\/(.*)\//":"\\1")_t_1_100_1.jpg"}
<a name="staticLink" href="{$items[numloop].link}" class="tooltip" title="
{if file_exists($image)}
<img src='{root_url}/uploads/images/catalog/{$items[numloop].link|regex_replace:"/.*\/(.*)\//":"\\1"}_t_1_100_1.jpg' title='{$items[numloop].title}' alt='{$items[numloop].title}' style='padding-right:30px; margin-top:10px;'/><br/>
{/if}
{if $items[numloop].centerlocation == true}<span class='loca'>{$items[numloop].centerlocation}</span>{/if}<br/>
{$items[numloop].title},<br/> {$items[numloop].nametitle}" target="_self" onMouseDown="javascript:toggleDiv('hideMe3')">{$items[numloop].title}, {$items[numloop].nametitle}</a>
</li>
{/section}
thanks for the help on this...
Re: Using the images in the cataloger [NOT_solved]
Posted: Wed Jul 23, 2008 2:13 pm
by JeremyBASS
to who created the cataloger... why is it we are having to do all this...

are we missing something here?

thanks....
Re: Using the images in the cataloger [NOT_solved]
Posted: Wed Jul 23, 2008 10:01 pm
by JeremyBASS

no???
um how do you mean?
Re: Using the images in the cataloger [NOT_solved]
Posted: Thu Jul 24, 2008 5:20 pm
by JeremyBASS
tenerd wrote:
..assign var="image" value="(root_url)/...
typo?
If i write this ..assign var="image" value="
(root_url
)/...
nothing shows up...
..assign var="image" value="
{root_url
}/... it terminates the line early...
outputing
/uploads/images/catalog/($items[numloop].link|regex_replace:"/.*\/(.*)\//":"\\1")_t_1_100_1.jpg"}
St. Joseph Regional Medical Center
Michael C. Minick, MD" target="_self" onMouseDown="javascript:toggleDiv('hideMe3')">Michael C. Minick, MD
so ... I guess the last question is how to put {} in side others?.... thanks for the help here...
Re: Using the images in the cataloger [NOT_solved]
Posted: Thu Jul 24, 2008 6:55 pm
by JeremyBASS
This is were I’m at but not working yet…
Code: Select all
<li>
{assign var="image"
value="($root_url)/uploads/images/catalog/($items[numloop].link|regex_replace:"/.*\/(.*)\//":"\\1")_t_1_100_1.jpg"}
<a name="staticLink" href="{$items[numloop].link}" class="tooltip" title="{if file_exists($image)}<img src='{$image}' title='{$items[numloop].title}' alt='{$items[numloop].title}' style='padding-right:30px; margin-top:10px;'/><br/>{/if}{if $items[numloop].centerlocation == true}<span class='loca'>{$items[numloop].centerlocation}</span>{/if}<br/>
{$items[numloop].title},<br/> {$items[numloop].nametitle}" target="_self" onMouseDown="javascript:toggleDiv('hideMe3')">{$items[numloop].title}, {$items[numloop].nametitle}</a>
</li>
which is outputting...
Larry Davis, MD" target="_self" onMouseDown="javascript:toggleDiv('hideMe3')">Larry Davis, MD
I'm just not finding the right way to write this out...
I don't know if this is the area of concern
{assign var="image"
value="($root_url)/uploads/images/catalog/($items[numloop].link|regex_replace:"/.*\/(.*)\//":"\\1")_t_1_100_1.jpg"}
or something else... stumped at a the moment... well thanks for the hand on this...
jeremyBass
Re: Using the images in the cataloger [NOT_solved]
Posted: Fri Jul 25, 2008 6:05 pm
by JeremyBASS
trying to read through... and talk it out...
this is what came up...
is it close...?
{assign var="image"
value="`$root_url.'/uploads/images/catalog/'.preg_replace('/.*\/(.*)\//','\\1',$items[numloop].link) . '_t_1_100_1.jpg'`"}
tested it... not right but on the right track?
thanks for the help here ....
jeremyBass
Re: Using the images in the cataloger [NOT_solved]
Posted: Fri Jul 25, 2008 7:03 pm
by JeremyBASS
Ok I 'm just going to list all the different way I'v tryed this... may-be someone well see the falut? anyways.... I'll just eidt the list as I go
woundering where I'm trying to writ this from?
Look Here
the not working list
first one.
{assign var='image'
value=`$root_url` . `/uploads/images/catalog/` . `$items[numloop].link|regex_replace:"/.*\/(.*)\//":"\\1"` . `_t_1_100_1.jpg`}
two
{assign var='image'
value='$root_url/uploads/images/catalog/{$items[numloop].link|regex_replace:"/.*\/(.*)\//":"\\1"}_t_1_100_1.jpg'}
three
{assign var="image"
value=`$root_url.'/uploads/images/catalog/'.preg_replace('/.*\/(.*)\//','\\1',$items[numloop].link) . '_t_1_100_1.jpg'`}
four
{assign var="image"
value=`$root_url . '/uploads/images/catalog/' . preg_replace("/.*\/(.*)\//","\\1",$items[numloop].link) . '_t_1_100_1.jpg'`}
five
{assign var="image"
value="($root_url)/uploads/images/catalog/($items[numloop].link|regex_replace:"/.*\/(.*)\//":"\\1")_t_1_100_1.jpg"}
which out puts this for {$image}
"()/uploads/images/catalog/(Array.link|regex_replace:"/.*\/(.*)\//":"\\1")_t_1_100_1.jpg"
six
{assign var="image"
value=$root_url/uploads/images/catalog/$items[numloop].link|regex_replace:"/.*\/(.*)\//":"\\1"_t_1_100_1.jpg}
which out puts this for {$image}
/uploads/images/catalog/Array.link|regex_replace:"/.*\/(.*)\//":"\\1"_t_1_100_1.jpg
seven
{assign var="image"
value=`$root_url/uploads/images/catalog/$items[numloop].link|regex_replace:"/.*\/(.*)\//":"\\1"_t_1_100_1.jpg`}
which out puts this for {$image}
`/uploads/images/catalog/Array.link|regex_replace:"/.*\/(.*)\//":"\\1"_t_1_100_1.jpg`
Re: Using the images in the cataloger [NOT_solved]
Posted: Tue Jul 29, 2008 7:43 pm
by JeremyBASS
Ok I have tried and tried and tried... and I can't this to go... I think It should be some thing like this...
{assign var="image"
value="($root_url)/uploads/images/catalog/($items[numloop].link|regex_replace:"/.*\/(.*)\//":"\\1")_t_1_100_1.jpg"}
{if file_exists($image)}{/if}
but that don't work and heck if i know why.... Someone?
jeremyBass
Re: Using the images in the cataloger [NOT_solved]
Posted: Wed Jul 30, 2008 5:23 pm
by JeremyBASS
Ok there I really could use a hand, I'm not asking for much here I think...
Is this closer? it doesn't work but I'm not sure how to write this out...
{assign var="image" value="uploads/images/catalog/($items[numloop].link|regex_replace:"/.*\/(.*)\//":"\\1")_t_1_100_1.jpg"}
{if file_exists($_SERVER['DOCUMENT_ROOT'].$image)}{/if}
thanks for the help
jeremyBass
Re: Using the images in the cataloger [NOT_solved]
Posted: Wed Jul 30, 2008 7:52 pm
by JeremyBASS
Ok so trrying this...
{assign var="image" value="uploads/images/catalog/".$items[numloop].link|regex_replace:"/.*\/(.*)\//":"\\1"."_t_1_100_1.jpg"}
{if file_exists(root_url."/".$image)}{/if}
if i put {$image) I get this as the out put...
"uploads/images/catalog/".Array.link|regex_replace:"/.*\/(.*)\//":"\\1"."_t_1_100_1.jpg"
so I think This all boils down to the
$items[numloop].link|regex_replace:"/.*\/(.*)\//":"\\1"."
Now if I can use the chidren's alias of the {$page_alias} here and that would slove this...
Can't seem to find that right now ... but hopefully this would be the end of this....