Archive for myfreeforum.org Before posting please check the "stickies" in the support forums.
Please ask questions in real English and not "txt". You will get a better response.
Please do not ask support questions via PMs.
 


       myfreeforum.org Forum Index -> Portal components
symon

Gallery problem

http://stevenkayleighfield.myfreeforum.org

www.stevenkayleighfield.co.uk


I have added the gallery portal to a webpage but am running into a few problems.

http://stevenkayleighfield.co.uk/gallery.html

When you click on a photo in the gallery it enlarges the picture which is not a problem,

http://stevenkayleighfield.co.uk/...amp;filter=&page=1&order=

however if they then click on the enlarged photo it takes you away from the site and to the myff gallery link and out of the website with no back button.

http://gallery.myff.org/gallery/9..._1466684485_31697147_730759_n.jpg

So my question is how to stop that 2nd click so they always stay with in the webpage.

Also if i juggle the code around and leave the add photo link up can people add photos with out being a member.

What im trying to achieve is a gallery where people can post their pic and comment on others with out being a member or with out being linked to the myff gallery page, i would like them to stay with ion the comment page.
myff admin

Have you altered the gallery template cms_gallery.tpl?

I have just added {U_GALLERY_REFERER} which can be used like so:

Code:

<td class="row2" colspan="2"><span class="topictitle"><a href="{U_GALLERY_REFERER}" >{GALLERY_IMAGE}</a></span></td>


It seems to work on here.
symon

I have edited the gallery.tpl have not added that code as of yet as im trying to change the width of the gallery row.

As you see below it is just overlapping

http://stevenkayleighfield.co.uk/gallery2.html
Nick(NR)

Have you thought about setting up lightbox, to show the full image rather than send the viewer to a different page with no back to gallery link?

http://www.lokeshdhakar.com/projects/lightbox2/
symon

yes ive heard of it but did not think it would suit here, as its aimed for other people to post their pics etc with out the need to login, the way lightbox works would mean that i would have to post the links myself rather than just letting them add to the gallery,, unless im missing something.

Ive got it how i want at the moment apart from two problems ,,, 1,, how to reduce the size of the gallery row and how to stop the 3rd click sending then to the gallery page ..
symon

myff admin wrote:
Have you altered the gallery template cms_gallery.tpl?

I have just added {U_GALLERY_REFERER} which can be used like so:

Code:

<td class="row2" colspan="2"><span class="topictitle"><a href="{U_GALLERY_REFERER}" >{GALLERY_IMAGE}</a></span></td>


It seems to work on here.


Not sure what that is meant to do but i have added it and all i see whe logged out is

Quote:
Guests cannot post attachments


This is my gallery.tpl using template 2

Spoiler:

Code:
<script>
function SelectAll(id)
{
document.getElementById(id).focus();
document.getElementById(id).select();
}
</script>

 
<!-- IF S_GALLERY_SHOWIMAGES -->
<!-- IF S_GALLERY_MODE == "IMAGES" -->
<form action="{U_GALLERY_ACTION}"  method="GET" onchange="forms[\'galleryform\'].submit()" name="galleryform">{S_GALLERY_HIDDEN}
<table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center">
<!-- BEGIN switch_gallery_title -->     
   <tr>
        <th  colspan="3" class="thTop" nowrap="nowrap">{GALLERY_TITLE}</th>
     </tr>
     
        
     </table>
     <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center">
<!-- END switch_gallery_title -->          
  <!-- BEGIN gallery_row -->
  <tr>
   <!-- BEGIN gallery_column -->
   <td class="row1" align="center" valign="center"><span class="topictitle"><a href="{gallery_row.gallery_column.THUMBNAIL_URL}" >{gallery_row.gallery_column.THUMBNAIL}</a></span></td>
 
   <!-- END gallery_column -->
    </tr>
  <!-- END gallery_row -->
  <td align="right"><span class="topictitle">{GALLERY_PAGINATION}</span></td>
     </tr>
</table>
</form>

<!-- ENDIF -->
<!-- ENDIF -->



<!-- IF S_GALLERY_SHOWUPLOAD -->
<script>

if ("{S_GALLERY_STATE}"=="attach")
{
   //document.write("here");
}
else if ("{S_GALLERY_STATE}"=="attacherror")
{
   document.write("Error: {S_GALLERY_ERROR}");
}
else if ("{S_GALLERY_STATE}"=="attached")
{
   document.write("File uploaded");



}

</script>

<form action="{S_GALLERY_ACTION}" method="post" target="_top"  enctype="multipart/form-data">

<table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center">
 
  <tr>
   <td class="row1"><table border="0" cellpadding="3" cellspacing="1" width="100%">
      
         <tr align="center">
         <td colspan="2" class="gensmall">{L_GALLERY_RULES}</td>
        </tr>
        <tr>
         <td width="30%" align="right"><span class="gensmall">{L_GALLERY_FILENAME}:</span></td>
         <td>
           <input type="file" class="gensmall" name="attach_file" size="25" />
         </td>
         </tr>
      
        <tr>
         <td width="30%" align="right"><span class="gensmall">{L_GALLERY_DESCRIPTION}:</span></td>
         <td>
           <textarea class="post" name="description" rows="5" cols="40" /></textarea>
         </td>
        </tr>
        
        <tr align="center">
         <td colspan="2">{S_GALLERY_HIDDEN_FIELDS}<input type="submit" name="attach" class="mainoption" value="{L_GALLERY_UPLOAD}" /></td>
        </tr>

<td class="row2" colspan="2"><span class="topictitle"><a href="{U_GALLERY_REFERER}" >{GALLERY_IMAGE}</a></span></td>
      
      </table></td>
  </tr>
</table>

</form>
<!-- ENDIF -->






<!-- IF S_GALLERY_MODE == "IMAGE" -->


<!-- BEGIN switch_gallery_title -->     

<table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center">

   <tr>
        <th  class="thTop" nowrap="nowrap">{GALLERY_TITLE}</th>
     </tr>
     </table>
<!-- END switch_gallery_title -->          
     <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center">
      <tr>
   
   <td class="row2" colspan="2"><span class="topictitle"><a href="{U_GALLERY_IMAGE_RETURN}" >{L_GALLERY_IMAGE_RETURN}</a></span></td>
 
    </tr>

  <tr>
   
   <td class="row2" colspan="2"><span class="topictitle"><a href="{GALLERY_IMAGE_URL}" >{GALLERY_IMAGE}</a></span></td>
 
    </tr>
    <tr>
     <td class="row2"><span class="topictitle">{L_GALLERY_IMAGE_DESCRIPTION}</span></td>
<!-- BEGIN switch_gallery_edit -->  
    <form action="{U_GALLERY_ACTION}" method="post">{S_GALLERY_HIDDEN_FIELDS}
    <td class="row2"><span class="topictitle"><textarea name="description" style="width: 500px;height=100px;">{GALLERY_IMAGE_DESCRIPTION}</textarea></span></td>
<!-- END switch_gallery_edit -->  
<!-- BEGIN switch_gallery_noedit -->  
    <td class="row2"><span class="topictitle">{GALLERY_IMAGE_DESCRIPTION}</span></td>
<!-- END switch_gallery_noedit -->  
    
    </tr>
  
    
    
     <tr>
  
    <td class="row2"><span class="topictitle">{L_GALLERY_IMAGE_VIEWS}</span></td>
    <td class="row2"><span class="topictitle">{GALLERY_IMAGE_VIEWS}</span></td>
  
    
    </tr>
  
 


    </form>

 
</table>


<!-- ENDIF -->

symon

Ok sorted 1 problem out

by removing

Code:
<span class="topictitle">


from

Code:
<td class="row1" align="center" valign="center"><span class="topictitle"><a href="{gallery_row.gallery_column.THUMBNAIL_URL}" >{gallery_row.gallery_column.THUMBNAIL}</a></span></td>


Has solved the width problem.

So only 2 problems lie

1. how to stop the 3rd link click and the second to get guest access to post photos
symon

update


3rd click removed

Code:
<a href="{GALLERY_IMAGE_URL}" >


removed from enlarged photo
symon

Still can not get guest access to upload.

Any ideas ?

Also trying to shorten the width of the photo when enlarged have tried many methods encluding adding width and style but none are working.
danm97

Maybe this can help you for the img size...

http://forum.myfreeforum.org/sutra135640.php#135640

I would change the class .postbody to which ever class you are using in the gallery for the imgs table.
symon

danm97 wrote:
Maybe this can help you for the img size...

http://forum.myfreeforum.org/sutra135640.php#135640

I would change the class .postbody to which ever class you are using in the gallery for the imgs table.


Have already tried that method but it does nothing. the problem is when you click on gallery thumbnails the pictures are too large.
danm97

Did you try it in this part of your cms_gallery.tpl ??

Code:
<!-- IF S_GALLERY_MODE == "IMAGE" -->
(codes)
<!-- ENDIF -->


(Note: there's a difference btw IMAGES and IMAGE.)

IMAGES is for the thumbnails and IMAGE is for the individual image (when you click on the thumbnail)
symon

Yep tried that and again nothing happened.

Have an idea im working on.
danm97

I just done it and it works...

Inside the
Code:
<!-- IF S_GALLERY_MODE == "IMAGE" -->
(codes)
<!-- ENDIF -->

find...
Code:
   <td class="row2" colspan="2"><span class="topictitle"><a href="{GALLERY_IMAGE_URL}" >{GALLERY_IMAGE}</a></span></td>


Replace
Code:
class="row2"
to
Code:
class="resize"


then...

Just after
Code:
</a>


add
Code:
<script>
  var w = 500;
      $(window).load(function() {

    $(document).ready(function() {
            $(".resize").find("img").each (function()
            {
            if ( $(this).width() > w ) {
                ow = $(this).width();
              
                h = $(this).height();
                h= parseInt(h * w/ow );
                 $(this).width(w);
                 $(this).height(h);
            }
            })
        });
});
</script>


This is working, I tested it. You can change the width of the default size you wish by chaging the 500 in the script.
danm97

ohhh and you need the jquery script in your header...

<script type="text/javascript" src="js/jquery.js" ></script>
symon

Scrub that ,,, one simple mistake


I had not added the script to overallheader.tpl i had added it to the wrong webpage template...

     

Thanks for the help
danm97

Cool !! glad it works now. Looks good too !!

Now you still want guests to be abble to upload pics...
Martin is the only one who can help you on this. There's no such option in that portal.
symon

danm97 wrote:
Cool !! glad it works now. Looks good too !!

Now you still want guests to be abble to upload pics...
Martin is the only one who can help you on this. There's no such option in that portal.


True where is the wizard when you need him lol...

Also would be a good idea i think to have a link to link to the next photo in the gallery in the enlarge stage rather than keep going back to the gallery.
danm97

symon wrote:

True where is the wizard when you need him lol...

Also would be a good idea i think to have a link to link to the next photo in the gallery in the enlarge stage rather than keep going back to the gallery.


I agree with you on this !!

Thats one of the million things I wanted to ask him... but I keep asking for too many things on here. I must calm down sometimes cuz I would be banned for flooding the support forum

I try to restrain myself to one request per week now  
myff admin

Guest upload of images is a tricky question.

I don't like the whole idea of anonymous galleries, they are dangerous enough things as it is.

       myfreeforum.org Forum Index -> Portal components
Page 1 of 1
Create your own free forum | Buy a domain to use with your forum