• Welcome to Simple Machines Community Forum. Please login or sign up.
November 26, 2021, 06:25:05 PM

News:

SMF 2.1 RC4 has been released! Try it out and help us test! :) Read more.


SMF Gallery

Started by SMFHacks.com Team, September 16, 2006, 07:13:02 PM

Previous topic - Next topic

usermike3969

check out mine and if thats something like what u wont then i can give u that code

!Hachi!

anyone tried animated gif?i can't view animated gif in lite version? vbgamer need help.
Happy Ramadan

vbgamer45

Quote from: hassan on November 07, 2006, 08:36:58 AM
anyone tried animated gif?i can't view animated gif in lite version? vbgamer need help.
For thumbnails it won't be animated since the image is resized.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

!Hachi!

no i can't SEE actually
Happy Ramadan

justafishermen

Quote from: usermike3969 on November 07, 2006, 01:58:09 AM
check out mine and if thats something like what u wont then i can give u that code


Hi Mike,

Yup thats pretty much what I was looking for. Thanks, looking forward to the codes!
Angling Fanatics Fishing Community
Built By The Members For The Members

usermike3969

Quote from: justafishermen on November 07, 2006, 09:48:32 AM
Hi Mike,

Yup thats pretty much what I was looking for. Thanks, looking forward to the codes!

in your default theme open the file Gallery.template.php

look for: <td align="center"><img height="' . $context['gallery_pic']['height']  . '" width="' . $context['gallery_pic']['width']  . '" src="' . $modSettings['gallery_url'] . $context['gallery_pic']['filename']  . '" />';

and under put: ?><script language="javascript" type="text/javascript">
<!--
function linkingcodes() {
  newwindow2=window.open('','name','height=350,width=800,scrollbars=yes');
  var tmp = newwindow2.document;
  tmp.write('<html><head><title>Linking codes</title>');
  tmp.write('');
  tmp.write('</head><body bgcolor="#000000"><center><font color="#FFFFFF">');
  tmp.write('HTML THUMB</br>&lt;img src="<? echo $modSettings['gallery_url'] .'thumb_'. $context['gallery_pic']['filename'];?>"&gt; ');
  tmp.write('</br></br>HTML</br>&lt;img src="<? echo $modSettings['gallery_url'] . $context['gallery_pic']['filename']; ?>"&gt;');
  tmp.write('</br></br>BBC THUMB</br>[img]<? echo $modSettings['gallery_url'] .'thumb_'. $context['gallery_pic']['filename'];?>[/img]');
  tmp.write('</br></br>BBC</br>[img]<? echo $modSettings['gallery_url'] . $context['gallery_pic']['filename']; ?>[/img]');
  tmp.write('</font></center></body></html>');
  tmp.close();
}
// -->
</script><form>
</br><input type="button" onClick="return linkingcodes()" value="Linking codes!">
</form>

<?


and this is for Version 1.6.4 i dont know if it will work on any other Versions

justafishermen

Hi Mike,

Doesnt work bud. I get the following error:

Template Parse Error!
There was a problem loading the /Themes/default/Gallery.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.
parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';'
Angling Fanatics Fishing Community
Built By The Members For The Members

justafishermen

Never mind, got it from smfhacks.com

Thanks Mike!
Angling Fanatics Fishing Community
Built By The Members For The Members

redm

Hi I'm new to SMF as well as the SMF Gallery. 

I'm trying to get the SMF Gallery to work under the Enterprise them. 

I copied and put into the index.template.php the following code for the enterprise theme.  Am I missing something?  The button doesn't come up.  I tried adding my own button (copying a different mod's button and changing everything to 'gallery' and that does show up and appears to work, but causes  'Undefined index: smfgallery_admin' in the forum error log whenever I try to access it.

under the function template_menu()
I added

if (in_array($context['current_action'], array('gallery','links','search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
$current_action = $context['current_action'];

I also copied the following that was in the default template

   // the [SMF Gallery] button
if ($context['allow_smfgallery_view'])
echo ($current_action == 'gallery' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'gallery' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=gallery">' , $txt['smfgallery_menu']  , '</a>
</td>' , $current_action == 'gallery' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

vbgamer45

Can you post a copy of your index.template.php of the theme you are using?
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

!Hachi!

VBGAMER plz view that screenshot y  i am unable to see thumbnail for that? its simple jpeg img.
Happy Ramadan

vbgamer45

It depends on how the image is formed needs to be a valid image it uses SMF functions for resizing the image.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

!Hachi!

thanks for your reply  actually we can see images by click on comment number but thumbnails are missing IE showing missing imgs..so thumbnail is problem
Happy Ramadan

Nexus-hq

ok first of all i have to say i love this mod

i am in process of starting a render site and i was going to use this but for some reason it wont show my thumbnails.

also my admin account can view the gallery but my test account cannot it gets a error so i sign out of test and log in to my admin and it works fine ( except the thumbnails still no thumbnails)

i am using 1.1RC3

and panics orange-lt's theme

vbgamer45

Each membergroup has to be given permission to view the gallery.
As for thumbnails I think it is some sort of server/permission issue.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Nexus-hq

ok what to i do it fix the thumbnail prob

when i go to the gallery folder and try to set the permissions to 777 but i get a error so how do i fix it?

Pratt

Hi again, i have another question, and would be gratefull if you guys can help me out on this one.

Some of my users have uploaded pictures, that only have 3 characters as a title/description/keywords. When i go to the search dialog and search for this pictures, i get an error (of course), because the search string is too short.

Is there a way to tweak the search option, so that my users can search pictures with less than 4 characters (in my case, with 3 characters), and which file must i edit?

vbgamer45

Yes you can I belive it is in Gallery.php
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Pratt

Quote from: vbgamer45 on November 23, 2006, 01:34:46 PM
Yes you can I belive it is in Gallery.php
Thanks, nailed it!
gallery.php

if(strlen($searchfor) <= 3)
fatal_error($txt['gallery_error_search_small'],false);

Changed 3 for 2 and no problem!
Thank you!

mark25

i have a small problem... when i try to put the blushing emoticon (code :">),
"', document.cprofile.comment); return false;">" shows up... but when i try to put it in popup the error doesn't appear...  ::) ....

Advertisement: