|
|
Thread Tools | Display Modes |
|
#1
|
||
|
panasonikon
|
How To Have Same Description in Multiple Galleries
Anyone have any thoughts or ideas on this?
![]() Quote:
|
|
|
|
||
|
#2
|
||
|
SmugMug Sorcerer
|
Quote:
in the control panel -> customize -> javascript block put the following: Code:
[FONT=Courier New]var dA = new Array(1); dA[0] = "hi, i'm a javascript description!";[/FONT] Code:
[FONT=Courier New]<html><script type="text/javascript">document.write(dA[0]);</script></html>[/FONT] by creating an array, we can just keep adding descriptions and use them in other galleries as well. example: if i were to add another description, my javascript would look like: Code:
[FONT=Courier New]var dA = new Array(2); dA[0] = "hi, i'm a javascript description!"; [/FONT][FONT=Courier New] dA[1] = "hi, i'm a second javascript description!";[/FONT]
__________________
Pedal faster |
|
|
|
||
|
#3
|
|
|
panasonikon
|
Thanks so much, bigwebguy! Andy tested and approved. It works a treat. Simple, elegant.
WTG
|
|
|
|
|
#4
|
||
|
SmugMug Sorcerer
|
Quote:
__________________
Pedal faster |
|
|
|
||
|
#5
|
||
|
panasonikon
|
Quote:
|
|
|
|
||
|
#6
|
||
|
What God Complex?
|
Quote:
__________________
Everyone Has A Photographic Memory. Some Just Do Not Have Film. www.zxstudios.com http://creativedragonstudios.smugmug.com |
|
|
|
||
|
#7
|
||
|
IMYRLESS
|
Doesn't appear to work in "list" mode...
Thanks for the solution. It works when viewing the particular gallery, but it appears not to display properly when viewing a list of galleries.
It doesn't appear to Execute the documet.write(). It only displays the code as text. Thoughts? -Dave- Quote:
|
|
|
|
||
|
#8
|
||
|
panasonikon
|
Quote:
|
|
|
|
||
|
#9
|
|
|
panasonikon
|
Dave,
Here's your Javascript: Code:
var galleryDesc = new Array(1); galleryDesc[0] = "<Font Class=galleryHeader> You are viewing Images from the Woodbury Nursery School 2005 Class Portraits. This gallery contains both individual and group images. If you are interested in ordering prints, please download and print the <a href=http://www.davidlobel.com/Forms/WJC_Nursery_Fall_2005_Order_Form.pdf Target=_new> Order Form</a>. If you do no have Adobe Acrobat, you will need to install it from the link at the top of this page, before you can view the order form. <Font Color=White>Please Note: </Font></b>The images you are viewing have an embedded watermark. Purchased images will not contain our watermark and will be printed using full resolution, color correction and proper cropping. If you have any questions, please <a href=JavaScript:emailMSG()>click here</a></Font>."; var galleryDesc = new Array(1); galleryDesc[0] = "<Font Class=galleryHeader> You are viewing Images from the Woodbury Nursery School 2005 Class Portraits. This gallery contains both individual and group images. If you are interested in ordering prints, please download and print the <a href=http://www.davidlobel.com/Forms/WJC_Nursery_Fall_2005_Order_Form.pdf Target=_new> Order Form</a>. If you do no have Adobe Acrobat, you will need to install it from the link at the top of this page, before you can view the order form. <Font Color=White>Please Note: </Font></b>The images you are viewing have an embedded watermark. Purchased images will not contain our watermark and will be printed using full resolution, color correction and proper cropping. If you have any questions, please <a href=JavaScript:emailMSG()>click here</a></Font>."; src="http://www.photodex.com/presenter.js" |
|
|
|
|
#10
|
|
|
panasonikon
|
I added quotes around the href, and changed target=new to target= "_blank" which is the way I know it..
var galleryDesc = new Array(1); galleryDesc[0] = "<Font Class=galleryHeader> You are viewing Images from the Woodbury Nursery School 2005 Class Portraits. This gallery contains both individual and group images. If you are interested in ordering prints, please download and print the <a href="http://www.davidlobel.com/Forms/WJC_Nursery_Fall_2005_Order_Form.pdf" target= "_blank">Order Form</a>. If you do not have Adobe Acrobat, you will need to install it from the link at the top of this page, before you can view the order form. <Font Color=White>Please Note: </Font></b>The images you are viewing have an embedded watermark. Purchased images will not contain our watermark and will be printed using full resolution, color correction and proper cropping. If you have any questions, please <a href=JavaScript:emailMSG()>click here</a></Font>."; And I have no clue what the below is: src="http://www.photodex.com/presenter.js" |
|
|
|
|
#11
|
|
|
panasonikon
|
I know the code works, becuase I tested it and have it going here:
http://andydemo.smugmug.com/ I just changed the gallery names for you on my demo site... |
|
|
|
|
#12
|
|
|
panasonikon
|
Hi Dave,
I don't think that you can put the hrefs in in this manner - the code given by bigwebguy works just great for text. See my andydemo.smugmug.com site for that.. I tried it and couldn't get it to work with links. The issue with the html (hrefs) is that the descriptions MUST have <html> at the beginning and </html> at the end. Maybe there's a JS trick that can handle this, we'll need to wait for the JS experts |
|
|
|
|
#13
|
|
|
panasonikon
|
Also, there's a typo in your desc:
If you do no have If you do not have... |
|
|
|
|
#14
|
|
|
panasonikon
|
OK, bigwebguy:
I had tested it just fine in Titles - now in Descriptions, I can get a very long description to show up just fine - but on the home page, the description shows as: Can you help? |
|
|
|
|
#15
|
||
|
IMYRLESS
|
Andy,
I removed all HTML code from the text. Now it's just plan text, severl sentences. So, I don't think it's the HREF. -Dave- Quote:
|
|
|
|
||
|
#16
|
||
|
panasonikon
|
Quote:
Don't forget that typo! Oh and I see you got the custom right click working, nice Now put this in your HEAD TAG area: <script language="javascript">document.title="|| David Lobel Photography / Visionlink Media ||"</script> and watch the browser title bar change |
|
|
|
||
|
#17
|
||
|
SmugMug Sorcerer
|
Quote:
I understand and agree with the reason that JT does this. It's because the description is truncated and he wouldnt be able to close the tags etc.. so he chooses to just not try and display the html at all. The implementation however is to just remove the tags and let the guts of the tags remain...which i think is maybe not the best. Just removing the entire html block would be the better way to go IMHO, and would solve this problem. I've tried to hack the html remover to confuse it into showing the tags, but all my tricks havent worked. Looks like he's using a pretty strong expression to get the tags removed. I'll see if i can figure out another way around this....but it will most likely mean not having the descriptions show up in the category pages. I may have to call in the cavalry:
__________________
Pedal faster |
|
|
|
||
|
#18
|
||
|
IMYRLESS
|
bigwiseguy,
No worries, the code was/is a great idea. But when you say to "remove the tags and let the guts of the tags remain", are you referring to the HTML in my text within the JS or the HTML tags in the DESC field in the gallery? I removed all HTML tags in the actual text. Thus, the only tags left are: <html><script type="text/javascript">document.write(galleryDesc[0])</script></html> I removed the <html></html> from the above line, but that too didn't work. So, are you reccommending that I go back and just cut and past the entire text in each DESC field? It appears that you just can't have "any" HTML coding in the DESC field. Sorry to be confused. Late night :) -Dave- Quote:
|
|
|
|
||
|
#19
|
||
|
SmugMug Sorcerer
|
Quote:
In short, my original solution doesn't look like it's gonna work as it is now. I'll try and play with it some more and see if i can get something working.
__________________
Pedal faster |
|
|
|
||
|
#20
|
||
|
IMYRLESS
|
Thanks. Much appreciated.
-D- Quote:
|
|
|
|
||
| Tell The World! | |
| Thread Tools | |
| Display Modes | |
|
|