Simple Machines Community Forum

General Community => Scripting Help => Topic started by: S Mac on October 30, 2013, 10:33:17 AM

Title: Adding a gallery to custom blocks mod
Post by: S Mac on October 30, 2013, 10:33:17 AM
I've successfully added the custom blocks mod and now have a footer at the bottom of my forum. I've added ads from Adsense and I'd also like to incorporate a gallery in the centre of the footer. I want a rotating gallery if there is one. I've asked for support from the creator of the mod and this was his response: "I do not know... May be copied in footer block PHP code that displays images."

So, can someone tell me how to do this? Please?
Title: Re: Adding a gallery to custom blocks mod
Post by: mashby on October 30, 2013, 10:47:51 AM
This is still outside the normal support, but I'll ask some questions anyway. What do you mean by rotating gallery?
Title: Re: Adding a gallery to custom blocks mod
Post by: S Mac on October 30, 2013, 11:05:58 AM
Hi, I mean I want the pictures to change periodically (automatically). Don't know if this is possible? And I wasn't sure where else to post this. I've tried the mod's support topic & don't have permission to post in the general mod support section for some reason. Thanks
Title: Re: Adding a gallery to custom blocks mod
Post by: mashby on October 30, 2013, 11:09:56 AM
I see now. This is really more a coding thing than anything else. Do you have an example of where you see one of these? I have something on my home page that does this. I've moved this topic to a more suitable location as well.
Title: Re: Adding a gallery to custom blocks mod
Post by: Kindred on October 30, 2013, 11:51:41 AM
If you have AEVA - someone posted a very nice rotating image script over on the wedge site....
Title: Re: Adding a gallery to custom blocks mod
Post by: S Mac on October 30, 2013, 11:56:30 AM
Thanks. I've just looked at your website. I don't want anything that fancy. I just want say, two rows of medium sized pictures that change over automatically every once in a while. Funny enough, I can't find an example now I'm looking for one. I'll have another look & see if I can find something.
Title: Re: Adding a gallery to custom blocks mod
Post by: S Mac on October 30, 2013, 11:58:02 AM
OK, how would I incorporate Aeva into my footer block? I'm guessing it's not easy...
Title: Re: Adding a gallery to custom blocks mod
Post by: Kindred on October 30, 2013, 12:07:46 PM
I can't get to the wedge site from my office computer...  but I know someone posted a script along with the code to drop into a portal block - probably about a year ago.

I used it for a while on 40Konline, but it ended up being a little too resource intensive for the ancient server we we running at the time.
Title: Re: Adding a gallery to custom blocks mod
Post by: S Mac on October 30, 2013, 03:11:23 PM
OK. So where am I looking? Do I start a new thread asking for a script/code to add to the portal block? Or am I asking for this wedge thingamajig?
Title: Re: Adding a gallery to custom blocks mod
Post by: Kindred on October 30, 2013, 03:13:09 PM
wedge is a fork of SMF. It is being made by the creator of aeva...  which is why there is some aeva stuff over there....

do a search
Title: Re: Adding a gallery to custom blocks mod
Post by: S Mac on November 12, 2013, 01:21:03 PM
OK, so I'm back on this...I want to add a gallery. I've looked over on Wedge, which'll be great once it's all done but I don't think it's all finished yet? Anyway I think the aeva one'll do the trick for my purposes. Would you mind taking a quick squizz at my site & telling me if I can add the mod in a small square to the top, between the logo & ad, without  messing around with all the coding? And is aeva safe to use, since they've stopped working on it? Thanks
Title: Re: Adding a gallery to custom blocks mod
Post by: S Mac on November 12, 2013, 01:22:44 PM
Doh. Sorry, website is www.blackbeautyhaircareforum.org.uk/forum (yeh, it's a bit of a mouthful) ;)
Title: Re: Adding a gallery to custom blocks mod
Post by: Arantor on November 12, 2013, 01:24:11 PM
That depends on your definition of 'great'. There are a number of things I personally find distasteful about the code, including the bits I wrote.

Aeva is safe to use as far as I know, though some of the things about it are not the most efficient they could be.
Title: Re: Adding a gallery to custom blocks mod
Post by: S Mac on November 12, 2013, 02:58:31 PM
Thanks. My definition of 'great' probably isn't the same as yours, being ignorant in these matters...so will I just be able to install aeva in that section of the website without trying to mess about with the coding & inevitably spending many frustrating hours trying to make it work?
Title: Re: Adding a gallery to custom blocks mod
Post by: Arantor on November 12, 2013, 03:01:06 PM
No. Some coding will absolutely be required since Aeva - and all the other galleries - don't magically just appear in custom blocks.
Title: Re: Adding a gallery to custom blocks mod
Post by: S Mac on November 12, 2013, 03:02:14 PM
That's a real shame ;) OK, so what do I do? Pls could you direct me to this coding I'll need. I'm told it's over on wedge...
Title: Re: Adding a gallery to custom blocks mod
Post by: Arantor on November 12, 2013, 03:03:27 PM
I don't even know if the coding on Wedge is in a readily usable format for you.

Not to mention that after the increasing levels of tension I won't even go back to wedge.org.
Title: Re: Adding a gallery to custom blocks mod
Post by: S Mac on November 12, 2013, 03:08:08 PM
Oh. Awkard. Erm...what do I do? Do I have to ask someone to write a code or is there another one?
Title: Re: Adding a gallery to custom blocks mod
Post by: vbgamer45 on November 12, 2013, 03:21:42 PM
I have a gallery mod as well. I could write some code to display images in a custom block if needed.
Title: Re: Adding a gallery to custom blocks mod
Post by: Kindred on November 12, 2013, 03:31:18 PM
found it...


http://wedge.org/off/7549/slideshows/msg281669/#msg281669

slideshow code for a custom block

If you just want a simple image per load - then THAT code is in the Aeva thread here...
Title: Re: Adding a gallery to custom blocks mod
Post by: Arantor on November 12, 2013, 03:32:12 PM
That is not a publicly accessible board. In fact IIRC you have to be a Friend to be able to see that.
Title: Re: Adding a gallery to custom blocks mod
Post by: Kindred on November 12, 2013, 03:33:36 PM
DOH!

Hmmm...  I wonder if Markham would mind me posting a copy here.. It's pretty nice slideshow code
Title: Re: Adding a gallery to custom blocks mod
Post by: S Mac on November 12, 2013, 03:38:39 PM
Thanks vbgamer45...I couldn't ask u to write a code, I don't have any $$. But Kindred's reply looks promising. But er, what's a simple image per load? I want quite a small gallery to slot into the top of my forum. Just a simple slideshow type thing.
Title: Re: Adding a gallery to custom blocks mod
Post by: Kindred on November 12, 2013, 03:47:11 PM
look here: http://www.askawitchcommunity.org/
over in the right column is a single image from the gallery.
It is loaded once per page load... there is no "slideshow" but it picks a random image each page load.

On the other hand at one point - I had an actual streaming slideshow, loading and scrolling through 30 images -- one image every 3 seconds.


The first script is simple - and is listed is the avea support thread (with several variations)
the second script is complicated (and can be resource intensive) and is on the wedge page that I linked to (which as Arantor reminded me, is not visible to standard guests or even general users)
Title: Re: Adding a gallery to custom blocks mod
Post by: S Mac on November 12, 2013, 04:02:58 PM
Ah, great. Thanks for that. Unfortunately I'm kinda leaning towards the gallery. It'd be ideal as the forum should be fairly picture-led. But d'you think it'll slow my web page too much?
Title: Re: Adding a gallery to custom blocks mod
Post by: Kindred on November 12, 2013, 04:40:28 PM
it's a possibility....   It was a known issue on the site that I ran it on (which was running on a dedicated server)
but then again, we had a huge gallery and hundreds of people online at any one time.
Title: Re: Adding a gallery to custom blocks mod
Post by: S Mac on November 12, 2013, 04:44:15 PM
I certainly won't have that problem, at least not for a while :( So who do I have to suck up to, to get this code? This Markham fella/girl?
Title: Re: Adding a gallery to custom blocks mod
Post by: Kindred on November 12, 2013, 04:48:07 PM
possibly.

He posted it in the semi-private area over on Wedge.    I have sent him a PM there asking if I can pass on the file(s) here...  but it may take a while to get an answer. He has not been online for a month and a half.
Title: Re: Adding a gallery to custom blocks mod
Post by: S Mac on November 12, 2013, 04:51:00 PM
Appreciate that. I'll wait to see if he gets back to us. Thanks for your help.
Title: Re: Adding a gallery to custom blocks mod
Post by: S Mac on November 13, 2013, 03:22:46 PM
OK, I couldn't wait. I'm going to try the simple version...but I can't find the script I need over on the Mod support page (for the single-load thing). Could you help pls? And also, where & how do I input the script when I have it? Thanks
Title: Re: Adding a gallery to custom blocks mod
Post by: Kindred on November 13, 2013, 03:27:08 PM
This is what I use in one of my portal blocks...

the first bit, which is commented out would probably also work by itself...


//global $sourcedir, $user_info, $ID_MEMBER, $context, $txt, $galurl, $galurl2, $scripturl, $settings, $db_prefix;
//loadLanguage('Aeva');
//@include_once($sourcedir . '/Aeva-Subs.php');
//echo aeva_listItems(aeva_getMediaItems(0, 1, 'RAND()'), false, '', 1);

global $sourcedir, $user_info, $ID_MEMBER, $context, $txt, $galurl, $galurl2, $scripturl, $settings, $db_prefix;

echo '
<div class="img_gallery" style="width:40%;overflow:none;float:left;">';

   require_once($sourcedir . '/Aeva-Subs.php');
//   loadMGal_Settings();
   loadLanguage('Aeva', 'english');

// Random=1 or Latest = 0
      $blocktype = 1;

// "thumb" or "preview"
      $blockimagetype = 'preview';

//      $blockFolder = $boarddir . '/Themes/default/aeva';
//      $blockItemsFile = $scrollerFolder . '/imageScrollerItems.xml';

// How many pictures
      $blockMaxItems = 1;
      $blockoffset = 0;
// width of block in percent
      $boxwidth = 100;
//img width
      $imgwidth = '175px';

if ($blocktype = 1 ) {
//Random
$items = aeva_getMediaItems($blockoffset, $blockMaxItems, 'rand()', true, array());
//, 'm.type = "image" AND a.access LIKE "%-1%" AND a.passwd=""');
} else {
//Latest
$items = aeva_getMediaItems($blockoffset, $blockMaxItems, 'm.id_media DESC', true, array());
}

echo '
    <div style="align: center;">';
echo '
        <div class="smalltext" style="text-align: center; margin-left: auto ;  margin-right: auto ;"></div>';

   foreach($items as $item) {
      echo '
   <div class="smalltext" style="display: inline; padding: 5px;float:left;text-align:center; align:center;  margin-left: auto;  margin-right: auto;">
      <h2><a href="',$galurl,'sa=item;id=',$item['id'],'">',$item['title'],'</a></h2><br />
      <a href="',$galurl,'sa=media;id=',$item['id'],'" title="',$item['title'],'" class="hs  " onclick="return hs.expand(this);"><img alt="" src="',$galurl,'sa=media;id=',$item['id'],';',$blockimagetype,'" alt=""  style="max-width:',$imgwidth,';" /></a><br />
      ',$txt['aeva_views'],' : ',$item['views'],'<br />
      ',$txt['aeva_posted_by'],' : <a href="',$scripturl,'?action=profile;u=',$item['poster_id'],'">',$item['poster_name'],'</a><br />
      ',$txt['aeva_in_album'],' : <a href="',$galurl,'sa=album;id=',$item['id_album'],'">',$item['album_name'],'</a>
      ',$item['is_new'] ? '<br /><img alt="" src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" border="0" />' : '','
    </div>';
    }
echo '
<br style="clear:both;" />
</div>';
Title: Re: Adding a gallery to custom blocks mod
Post by: S Mac on November 13, 2013, 04:15:57 PM
Wow. That looks scary. Where do I stick it, so to speak :)
Title: Re: Adding a gallery to custom blocks mod
Post by: S Mac on November 13, 2013, 04:16:56 PM
Oh, sorry. Do I just stick it in the block? Sorry to be dumb, it's a curse!
Title: Re: Adding a gallery to custom blocks mod
Post by: Kindred on November 13, 2013, 06:09:09 PM
yup....

do note some of the arguments and defined variables to make it do different things -- everything is pretty well commented.
Title: Re: Adding a gallery to custom blocks mod
Post by: S Mac on March 06, 2014, 01:52:20 PM
I've decided to have another go at adding a gallery... I think I'm going to try the SMF Gallery because it's the most up-to-date. Will this code still work in the block to make the pictures refresh on page load?
Title: Re: Adding a gallery to custom blocks mod
Post by: Kindred on March 06, 2014, 02:28:37 PM
no. the code that I gave is specific to aeva
Title: Re: Adding a gallery to custom blocks mod
Post by: S Mac on March 06, 2014, 03:16:56 PM
Oh. I'm just a bit nervous about installing the Aeva coz I don't have a clue - obviously - so if something went wrong I'm stuffed. Is there any way to get the SMF one into the block with the page load refresh thing?
Title: Re: Adding a gallery to custom blocks mod
Post by: vbgamer45 on March 06, 2014, 09:18:11 PM
Are you just wanting to display random gallery items if so I can write SMF Gallery code for that  not too hard
Title: Re: Adding a gallery to custom blocks mod
Post by: S Mac on March 07, 2014, 10:29:19 AM
Yes, I want to add a gallery  (SMF Gallery) of maybe four pictures in a row to my header block. Ideally the pics would change on each page load. Does this make sense/is it possible? And if so...you'd do that in return for my extreme gratitude/goodwill?
Title: Re: Adding a gallery to custom blocks mod
Post by: vbgamer45 on March 07, 2014, 11:38:26 AM
Here is the code for SMF 2.0.x


SMFGalleryEzBlockGalleryBlock(1,4);
function SMFGalleryEzBlockGalleryBlock($rows = 4, $images = 4, $category = 0, $type = 'recent', $startHtml = '', $endHtml = '')
{
global $txt, $smcFunc, $user_info, $context, $modSettings, $scripturl, $boardurl;


$galleryPro = false;
if (!$context['user']['is_guest'])
$groupsdata = implode($user_info['groups'],',');
else
$groupsdata = -1;


$galleryPro = true;





// Html Header
echo $startHtml;
$maxrowlevel = $rows;

if ($galleryPro == false)
$dbresult = $smcFunc['db_query']('', "
SELECT
p.ID_PICTURE, p.commenttotal, p.filesize, p.views, p.thumbfilename, p.title,
p.ID_MEMBER, m.real_name, p.date
FROM {db_prefix}gallery_pic as p
LEFT JOIN {db_prefix}members AS m ON (p.ID_MEMBER = m.ID_MEMBER) 
WHERE p.approved = 1 " . ($category != 0 ? ' p.ID_CAT = ' . $category : '' ) . "
ORDER BY p.ID_PICTURE DESC LIMIT $images");
else
$dbresult = $smcFunc['db_query']('', "
SELECT
p.ID_PICTURE, p.commenttotal, p.filesize, p.views, p.thumbfilename, p.title,
p.ID_MEMBER, m.real_name, p.date
FROM {db_prefix}gallery_pic as p
LEFT JOIN {db_prefix}members AS m ON (p.ID_MEMBER = m.ID_MEMBER) 
LEFT JOIN {db_prefix}gallery_usersettings AS s ON (s.ID_MEMBER = m.ID_MEMBER)
LEFT JOIN {db_prefix}gallery_catperm AS c ON (c.ID_GROUP IN ($groupsdata) AND c.ID_CAT = p.ID_CAT)
WHERE ((s.private =0 || s.private IS NULL ) AND (s.password = '' || s.password IS NULL )  AND p.USER_ID_CAT !=0 AND p.approved =1) || (p.approved =1 AND p.USER_ID_CAT =0 AND (c.view IS NULL || c.view =1))
" . ($category != 0 ? ' AND p.ID_CAT = ' . $category : '' ) . "
GROUP by p.ID_PICTURE ORDER BY p.ID_PICTURE DESC LIMIT $images");


$gallery_recent = array();
while($row = $smcFunc['db_fetch_assoc']($dbresult))
{
$gallery_recent[] = array(
'ID_PICTURE' => $row['ID_PICTURE'],
'title' => $row['title'],
'thumbfilename' =>  $row['thumbfilename'],
'views' => $row['views'],
'filesize' => round($row['filesize'] / 1024, 2) . 'kb',
'date' => timeformat($row['date']),
'commenttotal' => $row['commenttotal'],
'commentlink' => ' (<a href="' . $scripturl . '?action=gallery;sa=view;id=' . $row['ID_PICTURE'] . '">' . $row['commenttotal'] . '</a>)<br />',
'profilelink' => ' <a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">'  . $row['real_name'] . '</a><br />',
);

}
$smcFunc['db_free_result']($dbresult);


//Check if the gallery url has been set if not use the default
if (empty($modSettings['gallery_url']))
$modSettings['gallery_url'] = $boardurl . '/gallery/';

echo '<table cellspacing="0" cellpadding="5" border="0" align="center" width="100%">
';
$rowlevel = 0;

foreach ($gallery_recent as $picture)
{
if ($rowlevel == 0)
echo '<tr>';

echo '<td align="center"><a href="' . $scripturl . '?action=gallery;sa=view;' . (empty($modSettings['gallery_thumb_width']) ? 'pic=' : 'id=')  . $picture['ID_PICTURE'] . '"><img alt="" src="' . $modSettings['gallery_url'] . $picture['thumbfilename']  . '" /></a><br />
<span class="smalltext">' . 'Views: ' . $picture['views'] . '<br />';
echo 'Comments:' . $picture['commentlink'];
echo 'By: ' . $picture['profilelink'];
echo '</span></td>';

if($rowlevel < ($maxrowlevel-1))
$rowlevel++;
else
{
echo '</tr>';
$rowlevel = 0;
}
}
if($rowlevel !=0)
echo '</tr>';

echo '</table>';

// Html Footer
echo $endHtml;

}
Title: Re: Adding a gallery to custom blocks mod
Post by: S Mac on March 07, 2014, 12:23:25 PM
You're an absolute star. Thank you very much! But...can someone tell me where I put this code? In the block itself?
Title: Re: Adding a gallery to custom blocks mod
Post by: vbgamer45 on March 07, 2014, 01:25:00 PM
Yeah I would put in a php block.
Title: Re: Adding a gallery to custom blocks mod
Post by: S Mac on March 07, 2014, 05:58:01 PM
OK, I'm obviously doing something wrong. I suspected I would. I've installed the gallery & added a picture. I added your code to my custom block and nothing happened. Am I doing it all wrong? I've attached what I did...
Title: Re: Adding a gallery to custom blocks mod
Post by: vbgamer45 on March 07, 2014, 07:17:45 PM
Do you have pictures loaded in the gallery?
Also if you are an administrator make sure you check Administrotor in permissions to view the block.
Title: Re: Adding a gallery to custom blocks mod
Post by: S Mac on March 07, 2014, 07:35:09 PM
Hmm. I checked everything and yes, I have pictures loaded - 2 of them so far but it should still work, right? One strange thing happened when I was checking the permissions in the block - I ticked the box for the administrator to view the block (only moderator was checked before), and the page wouldn't load. I got a strange 'website under administration' message. I wonder if that's something to do with it. Also, I just cut & pasted your code straight in - I didn't have to convert in any way did I?
Title: Re: Adding a gallery to custom blocks mod
Post by: vbgamer45 on March 07, 2014, 11:16:00 PM
Just retested on my site as SSI and works ok here is the ssi code.
You can try otherwise. Try putting
<?php

In front of all the code.


require 'SSI.php';

SMFGalleryEzBlockGalleryBlock(1,4);
function SMFGalleryEzBlockGalleryBlock($rows = 4, $images = 4, $category = 0, $type = 'recent', $startHtml = '', $endHtml = '')
{
global $txt, $smcFunc, $user_info, $context, $modSettings, $scripturl, $boardurl;


$galleryPro = false;
if (!$context['user']['is_guest'])
$groupsdata = implode($user_info['groups'],',');
else
$groupsdata = -1;

// Html Header
echo $startHtml;
$maxrowlevel = $rows;

if ($galleryPro == false)
$dbresult = $smcFunc['db_query']('', "
SELECT
p.ID_PICTURE, p.commenttotal, p.filesize, p.views, p.thumbfilename, p.title,
p.ID_MEMBER, m.real_name, p.date
FROM {db_prefix}gallery_pic as p
LEFT JOIN {db_prefix}members AS m ON (p.ID_MEMBER = m.ID_MEMBER) 
WHERE p.approved = 1 " . ($category != 0 ? ' p.ID_CAT = ' . $category : '' ) . "
ORDER BY p.ID_PICTURE DESC LIMIT $images");
else
$dbresult = $smcFunc['db_query']('', "
SELECT
p.ID_PICTURE, p.commenttotal, p.filesize, p.views, p.thumbfilename, p.title,
p.ID_MEMBER, m.real_name, p.date
FROM {db_prefix}gallery_pic as p
LEFT JOIN {db_prefix}members AS m ON (p.ID_MEMBER = m.ID_MEMBER) 
LEFT JOIN {db_prefix}gallery_usersettings AS s ON (s.ID_MEMBER = m.ID_MEMBER)
LEFT JOIN {db_prefix}gallery_catperm AS c ON (c.ID_GROUP IN ($groupsdata) AND c.ID_CAT = p.ID_CAT)
WHERE ((s.private =0 || s.private IS NULL ) AND (s.password = '' || s.password IS NULL )  AND p.USER_ID_CAT !=0 AND p.approved =1) || (p.approved =1 AND p.USER_ID_CAT =0 AND (c.view IS NULL || c.view =1))
" . ($category != 0 ? ' AND p.ID_CAT = ' . $category : '' ) . "
GROUP by p.ID_PICTURE ORDER BY p.ID_PICTURE DESC LIMIT $images");


$gallery_recent = array();
while($row = $smcFunc['db_fetch_assoc']($dbresult))
{
$gallery_recent[] = array(
'ID_PICTURE' => $row['ID_PICTURE'],
'title' => $row['title'],
'thumbfilename' =>  $row['thumbfilename'],
'views' => $row['views'],
'filesize' => round($row['filesize'] / 1024, 2) . 'kb',
'date' => timeformat($row['date']),
'commenttotal' => $row['commenttotal'],
'commentlink' => ' (<a href="' . $scripturl . '?action=gallery;sa=view;id=' . $row['ID_PICTURE'] . '">' . $row['commenttotal'] . '</a>)<br />',
'profilelink' => ' <a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">'  . $row['real_name'] . '</a><br />',
);

}
$smcFunc['db_free_result']($dbresult);


//Check if the gallery url has been set if not use the default
if (empty($modSettings['gallery_url']))
$modSettings['gallery_url'] = $boardurl . '/gallery/';

echo '<table cellspacing="0" cellpadding="5" border="0" align="center" width="100%">
';
$rowlevel = 0;

foreach ($gallery_recent as $picture)
{
if ($rowlevel == 0)
echo '<tr>';

echo '<td align="center"><a href="' . $scripturl . '?action=gallery;sa=view;' . (empty($modSettings['gallery_thumb_width']) ? 'pic=' : 'id=')  . $picture['ID_PICTURE'] . '"><img alt="" src="' . $modSettings['gallery_url'] . $picture['thumbfilename']  . '" /></a><br />
<span class="smalltext">' . 'Views: ' . $picture['views'] . '<br />';
echo 'Comments:' . $picture['commentlink'];
echo 'By: ' . $picture['profilelink'];
echo '</span></td>';

if($rowlevel < ($maxrowlevel-1))
$rowlevel++;
else
{
echo '</tr>';
$rowlevel = 0;
}
}
if($rowlevel !=0)
echo '</tr>';

echo '</table>';

// Html Footer
echo $endHtml;

}
Title: Re: Adding a gallery to custom blocks mod
Post by: S Mac on March 08, 2014, 07:49:11 AM
Hi, I just tried putting the <?php in front of all the code as you suggested and it's still not working I'm afraid. Problem is, when I try to change the block setting so administrator can view, the whole website goes down & I get a HTTP 500 website under maintenance message...what's going wrong?
Title: Re: Adding a gallery to custom blocks mod
Post by: S Mac on March 08, 2014, 03:47:39 PM
Still need help with this please. I'm dying to get the gallery up & running...
Title: Re: Adding a gallery to custom blocks mod
Post by: vbgamer45 on March 08, 2014, 04:17:34 PM
Hard to say would it be possible to get an admin login/ftp too?
Title: Re: Adding a gallery to custom blocks mod
Post by: S Mac on March 08, 2014, 04:24:19 PM
You mean so you can access it yourself? I guess so, but my life is in your hands. Not joking. So, how do I give you this info?
Title: Re: Adding a gallery to custom blocks mod
Post by: vbgamer45 on March 08, 2014, 09:22:39 PM
Via pm. You can either make a new account and give access would be best safe way. Then  remove access when we are finished.
Title: Re: Adding a gallery to custom blocks mod
Post by: vbgamer45 on March 11, 2014, 12:01:09 AM
Was able to get to work with your custom blocks mod appears in your forum's header.
Had to do one tweak to the code above which I updated now.
Title: Re: Adding a gallery to custom blocks mod
Post by: S Mac on March 11, 2014, 04:36:09 PM
I know, I'm really pleased - thanks for your help. If I want to change the number of pictures in future, do I just change the line: ($rows = 4, $images = 4, $category = 0, $type = 'recent', $startHtml = '', $endHtml = '')
to the relevant figure?
Title: Re: Adding a gallery to custom blocks mod
Post by: vbgamer45 on March 11, 2014, 05:27:45 PM
You would edit this part of the code

SMFGalleryEzBlockGalleryBlock(1,4);


The number 4 controls how many images
Title: Re: Adding a gallery to custom blocks mod
Post by: S Mac on March 11, 2014, 06:00:59 PM
Brilliant, thanks.