• Anonymous
  • Login
  • Register
Open Notes Picture Database - Discussion: comments counter in picture overview

Created on Nov 23, 2006
Created by heinz koton
Status
Open

a little enhancement:
in view "HTML\PhotosForPublic"
replace in the html column:
comments:=@If(@IsAvailable(RESPONSECOUNT);" comments: "+"("+@Text(RESPONSECOUNT)+")";"");
_subject := @If(@IsAvailable(Subject);Subject;"Album: "+AlbumName);
_subject := @ReplaceSubstring(_Subject;"&";"&");
_subject := @ReplaceSubstring(_Subject;"\"";""");


webdbname := @WebDbName;
_res := @If(@IsNumber(PHOTO_THUMB_HEIGHT);" height=\"" + @Text(PHOTO_THUMB_HEIGHT) + "\" width=\"" + @Text(PHOTO_THUMB_WIDTH) + "\"";"");

link := "/"+webdbname+@If(Form="Album_sub";"/albums/";"/pictures/")+PermaLink;

image1 := "<img align=\"left\" src=\"/"+WebDbName+"/pictures/"+@If(Form="Album_sub" & AlbumPictureChoice != "" ;@Word( AlbumPictureChoice ; ":" ; 1 );PermaLink)+"/$File/"+@If(Form="Album_sub";AlbumPictureThumbnail;PHOTO_THUMB_FILENAME)+"\"" + _res + " alt=\"" + _Subject + "\" title=\"Open " + _Subject + "\" class=\"showThumbs\">";

image2 := "<img align=\"left\" src=\"/"+WebDbName+@If(Form="Album_sub" & AlbumPictureChoice != "" ;@If(Form="Album_sub";AlbumPicture;PermaLink)+"/$File/"+@If(Form="Album_sub";AlbumPictureThumbnail;PHOTO_THUMB_FILENAME);"/no_preview_available.gif")+"\" border=\"0\" title=\"Open " + _Subject + "\" class=\"showThumbs\">";

@If(@If(Form="Album_sub";AlbumPictureThumbnail;PHOTO_THUMB_FILENAME) = ""; image:=image2;image:=image1);

AlbumHTML := "<a href=\""+link+"\">"+@NewLine
+image+"</a>" + Album_Description+"" ;


Album_SubHTML :=
"<div class=\"StoryContents\"><p class=\"StoryContentsText\" >" + @NewLine +
"<table><tr><td>" + albumHTML +"</td></tr></table>"+ @NewLine +
"</div>" + @NewLine;

PictureHTML := "<span class=\"Thumbnail\">" + @NewLine +
"<a href=\""+link+"\">"+@NewLine +
image+"</a><br clear=\"right\">"+ @NewLine +
_Subject+comments+"<br clear=\"all\">&nbsp;</span>" + @NewLine;

@If(Form="Album_sub"; Album_SubHTML ; PictureHTML )



In this field you can enter the actual discussion topic.

You can use the rich text editor for rich text formating. You can also enter HTML to embed objects, e.g. to embed a YouTube video or a screenshot of the project. In this case use '[' and ']' to mark the passthrough HTML as such.

Please note that the first time you use the new UI your description is converted from rich text to MIME. You might want to copy and paste the raw plain text from the old UI in the new UI so that you don't loose information.