SMFHacks.com
SMFHacks
Community Suite
SMF Gallery Pro
SMF Store
SMF Classifieds
Newsletter Pro
Downloads System Pro
Ad Seller Pro
Badge Awards
Hacks and Mods
Latest SMF Hacks
TopTen Hacks
Styles and Themes
Add a Hack
Manage Hacks
Earn Money from Your Forum with these tips
SMF Theme Generator
SMF Package Parser
Free SMF Hosting
Buy Website Traffic
Site Showcase
Email Marketing Software
Search Forums
Advanced search
User
Welcome,
Guest
. Please
login
or
register
.
May 18, 2013, 04:59:15 am
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Stats
Members
Total Members: 10755
Latest:
henrywilliams0173
Stats
Total Posts: 32348
Total Topics: 5473
Online Today: 50
Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Users: 1
Guests: 42
Total: 43
tank_fv101
SMFHacks.com
Forum
SMF Gallery Lite
SMF Gallery Lite
PIMP YOUR GALLERY TUT!!
0 Members and 1 Guest are viewing this topic.
« previous
next »
Pages:
1
[
2
]
Author
Topic: PIMP YOUR GALLERY TUT!! (Read 14014 times)
Jpg
Inline PM Customer
Offline
Posts: 25
I love cats they taste like chicken!!
Re: PIMP YOUR GALLERY TUT!!
«
Reply #15 on:
October 14, 2006, 11:10:19 pm »
Ok, let me add this in...
----------
Done, Now they work like a charm.
Logged
Me_angus
Inline PM Customer
Offline
Posts: 39
Re: PIMP YOUR GALLERY TUT!!
«
Reply #16 on:
October 15, 2006, 07:47:59 am »
Add this where? And is the bug fix you mentioned in SSI Mod topic?
Quote from: SMFHacks on October 14, 2006, 10:49:33 pm
Need to add this to query WHERE approved = 1
Logged
SMFHacks
Administrator
Hero Member
Offline
Posts: 10987
Re: PIMP YOUR GALLERY TUT!!
«
Reply #17 on:
October 15, 2006, 08:07:36 am »
Yeah same fix this is just for the random image.
Logged
Jpg
Inline PM Customer
Offline
Posts: 25
I love cats they taste like chicken!!
Re: PIMP YOUR GALLERY TUT!!
«
Reply #18 on:
October 17, 2006, 08:35:27 pm »
Any ideas man?
I noticed that the logo, etc...
Doesn't show up in the add images section,etc....hmmm....
I'll take a look into this.
Logged
Jpg
Inline PM Customer
Offline
Posts: 25
I love cats they taste like chicken!!
Re: PIMP YOUR GALLERY TUT!!
«
Reply #19 on:
March 13, 2007, 08:28:06 pm »
I'm back with another tutorial on Gallery Lite...Show top 5 most popular images in the gallery in a category.
This is the code for most popular/most viewed images in your gallery.
[This is for a php block with tinyportal if you have.]
Code:
global $scripturl,$db_prefix,$modSettings,$boardurl;
echo'<p align="left"><font size="1"><b>Popular</b></font></p>';
echo'<table cellspacing="0" cellpadding="5" border="0" align="center" width="90%"><tr>';
if(empty($modSettings['gallery_url']))
{
$modSettings['gallery_url'] = $boardurl . '/gallery/';
}
$request = db_query("SELECT thumbfilename,ID_PICTURE FROM {$db_prefix}gallery_pic WHERE approved = '1' GROUP BY thumbfilename ORDER BY views DESC LIMIT 5", __FILE__,__LINE__);
while ($row = mysql_fetch_assoc($request))
echo' <center><td align="center" colspan="3"><a href="', $scripturl, '?action=gallery;sa=view;id=',
$row['ID_PICTURE'], '"><img src="', $modSettings['gallery_url'] .
$row['thumbfilename'] ,'" /></a></center>';
echo'</td></tr>';
echo'</table></br>';
mysql_free_result($request);
Lemme break some of this code apart for everyone to learn some php.
This section of the code controls what data of the code above shows.
Code:
$request = db_query("SELECT thumbfilename,ID_PICTURE FROM {$db_prefix}gallery_pic WHERE approved = '1' GROUP BY thumbfilename ORDER BY views DESC LIMIT 5", __FILE__,__LINE__);
Code:
WHERE approved = '1'
Shows only images been approved or not.
This following code orders the thumbnails with the next comman which can be anything.
Code:
ORDER BY
You can replace
Code:
views
with
Code:
date
to do it by newest if you want.
The next code shows the number of thumbnails descending. Just change the number 5 to anything else you want.
Code:
DESC LIMIT 5
The next code is to organize the thumbnails by category if you only want 1 you add this code.
Code:
WHERE ID_CAT = '???'
It should be used like-
Code:
global $scripturl,$db_prefix,$modSettings,$boardurl;
echo'<p align="left"><font size="1"><b>Category 1</b></font></p>';
echo'<table cellspacing="0" cellpadding="5" border="0" align="center" width="90%"><tr>';
if(empty($modSettings['gallery_url']))
{
$modSettings['gallery_url'] = $boardurl . '/gallery/';
}
$request = db_query("SELECT thumbfilename, ID_CAT, ID_PICTURE FROM {$db_prefix}gallery_pic WHERE ID_CAT = '1' GROUP BY thumbfilename ORDER BY date DESC LIMIT 5", __FILE__, __LINE__);
$row = mysql_fetch_assoc($request);
while ($row = mysql_fetch_assoc($request))
echo' <center><td align="center" colspan="3"><a href="', $scripturl, '?action=gallery;sa=view;id=',
$row['ID_PICTURE'], '"><img src="', $modSettings['gallery_url'] .
$row['thumbfilename'] ,'" /></a></center>';
echo'</td></tr>';
echo'</table></br>';
mysql_free_result($request);
There are other commands but these are the basics.
-------------
I actually redid the whole gallery package with completely different templates and drop down menus to go through categories...and I learned how to integrate it with the default profile...
I also learned how to add shadows to images...but I don't think SmfHacks would appreciate a hooked up version of gallery lite running around with unique features that gallery pro doesn't even have...
So I'll keep it personal...I really wish I had gallery pro though.
I wouldn't even need to hook up gallery lite. <.<
I'll release probably the full hack later on when I finish it..lol..
«
Last Edit: March 13, 2007, 08:32:32 pm by Jpg
»
Logged
Jpg
Inline PM Customer
Offline
Posts: 25
I love cats they taste like chicken!!
Re: PIMP YOUR GALLERY TUT!!
«
Reply #20 on:
June 02, 2007, 11:44:43 am »
Yowza, haven't even been using TP lately..but then again I think I should release one more trick I have.
Well this trick gives you newest and most popular 5 images on your gallery main...but looks just like Gallery Pro...in the fact I used the catbgs and tite classses to decorate them.
Add them below this code:
Code:
echo '</tr>';
if($g_manage)
{
echo '<tr class="titlebg">
<td colspan="6"> </td>
</tr>';
}
else
echo '<tr class="titlebg">
<td colspan="4"> </td>
</tr>';
mysql_free_result($dbresult2);
}
mysql_free_result($dbresult);
echo '</table><br /><br /><br />';
Newest Code-
Code:
echo'
<table cellspacing="0" cellpadding="5" border="0" align="center" width="100%" class="tborder">
<tr class="titlebg">
<td align="center" width="100%" >Newest</td>
</tr></table>
<table cellspacing="0" cellpadding="5" border="0" align="center" width="100%" class="tborder">
<tr class="windowbg2">
<td align="center" width="100%" >';
if(empty($modSettings['gallery_url']))
{
$modSettings['gallery_url'] = $boardurl . '/gallery/';
}
$dbresult = db_query("SELECT p.ID_PICTURE, p.commenttotal, p.filesize, p.views, p.thumbfilename, p.title, p.ID_MEMBER, m.memberName, m.realName, p.date, p.description FROM {$db_prefix}gallery_pic as p, {$db_prefix}members AS m WHERE p.ID_MEMBER = m.ID_MEMBER AND p.approved = 1 ORDER BY date DESC LIMIT 5", __FILE__, __LINE__);
$rowlevel = 0;
while($row = mysql_fetch_assoc($dbresult))
{
if($rowlevel == 0)
echo '<center><td align="center" width="100%" ><span class="img-shadow"><a href="' . $scripturl . '?action=gallery;sa=view;id=' . $row['ID_PICTURE'] . '"><img src="' . $modSettings['gallery_url'] . $row['thumbfilename'] . '" border="0" /></a></span><br />';
echo ' <td align="center" width="100%" ><span class="smalltext">' . $txt['gallery_text_views'] . $row['views'] . '<br />';
echo $txt['gallery_text_filesize'] . round($row['filesize'] / 1024, 2) . 'KB<br />';
echo $txt['gallery_text_date'] . timeformat($row['date']) . '<br />';
echo $txt['gallery_text_comments'] . ' (<a href="' . $scripturl . '?action=gallery;sa=view;id=' . $row['ID_PICTURE'] . '">' . $row['commenttotal'] . '</a>)<br />';
echo $txt['gallery_text_by'] . ' <a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['realName'] . '</a><br />';
echo '</span>';
}
echo'</td></tr></center>';
echo'</table></br>';
mysql_free_result($dbresult);
Popular/Top 5 Most Viewed-
Code:
echo'
<table cellspacing="0" cellpadding="5" border="0" align="center" width="100%" class="tborder">
<tr class="titlebg">
<td align="center" width="100%" >Popular</td>
</tr></table>
<table cellspacing="0" cellpadding="5" border="0" align="center" width="100%" class="tborder">
<tr class="windowbg2">
<td align="center">';
if(empty($modSettings['gallery_url']))
{
$modSettings['gallery_url'] = $boardurl . '/gallery/';
}
$dbresult = db_query("SELECT p.ID_PICTURE, p.commenttotal, p.filesize, p.views, p.thumbfilename, p.title, p.ID_MEMBER, m.memberName, m.realName, p.date, p.description FROM {$db_prefix}gallery_pic as p, {$db_prefix}members AS m WHERE p.ID_MEMBER = m.ID_MEMBER AND p.approved = 1 ORDER BY views DESC LIMIT 5", __FILE__, __LINE__);
$rowlevel = 0;
while($row = mysql_fetch_assoc($dbresult))
{
if($rowlevel == 0)
echo '<center><td align="center" ><span class="img-shadow"><a href="' . $scripturl . '?action=gallery;sa=view;id=' . $row['ID_PICTURE'] . '"><img src="' . $modSettings['gallery_url'] . $row['thumbfilename'] . '" border="0" /></a></span><br />';
echo ' <td align="center" width="100%" ><span class="smalltext">' . $txt['gallery_text_views'] . $row['views'] . '<br />';
echo $txt['gallery_text_filesize'] . round($row['filesize'] / 1024, 2) . 'KB<br />';
echo $txt['gallery_text_date'] . timeformat($row['date']) . '<br />';
echo $txt['gallery_text_comments'] . ' (<a href="' . $scripturl . '?action=gallery;sa=view;id=' . $row['ID_PICTURE'] . '">' . $row['commenttotal'] . '</a>)<br />';
echo $txt['gallery_text_by'] . ' <a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['realName'] . '</a><br />';
echo '</span>';
}
echo'</td></tr></center>';
echo'</table></br>';
mysql_free_result($dbresult);
«
Last Edit: June 02, 2007, 11:46:26 am by Jpg
»
Logged
Jump1979man
Sr. Member
Offline
Posts: 274
Re: PIMP YOUR GALLERY TUT!!
«
Reply #21 on:
June 02, 2007, 12:12:43 pm »
nice work.
Logged
Midwest Motorcycles Forum
http://www.mwmotorcycles.com
Riverway Racing
https://www.riverwayracing.com
Motorcycle parts, gear, and accessories.
SoulPleX
Inline PM Customer
Offline
Posts: 8
Re: PIMP YOUR GALLERY TUT!!
«
Reply #22 on:
August 26, 2007, 12:14:41 pm »
'add shadows to images' what does this mean? If i place my mouse over a image in my gallery i want it to blow up in a bigger box for viewing. I hope that made since. Is adding shadows to images th same then??
Logged
MinasC
Inline PM Customer
Offline
Posts: 36
Re: PIMP YOUR GALLERY TUT!!
«
Reply #23 on:
August 29, 2007, 10:38:15 am »
woooooow , great work Jpg !!!!
Logged
Hassan
Inline PM Customer
Offline
Posts: 4
Re: PIMP YOUR GALLERY TUT!!
«
Reply #24 on:
November 23, 2007, 07:52:38 pm »
Quote from: Jpg on June 02, 2007, 11:44:43 am
Yowza, haven't even been using TP lately..but then again I think I should release one more trick I have.
Well this trick gives you newest and most popular 5 images on your gallery main...but looks just like Gallery Pro...in the fact I used the catbgs and tite classses to decorate them.
Add them below this code:
Code:
echo '</tr>';
if($g_manage)
{
echo '<tr class="titlebg">
<td colspan="6"> </td>
</tr>';
}
else
echo '<tr class="titlebg">
<td colspan="4"> </td>
</tr>';
mysql_free_result($dbresult2);
}
mysql_free_result($dbresult);
echo '</table><br /><br /><br />';
Newest Code-
Code:
echo'
<table cellspacing="0" cellpadding="5" border="0" align="center" width="100%" class="tborder">
<tr class="titlebg">
<td align="center" width="100%" >Newest</td>
</tr></table>
<table cellspacing="0" cellpadding="5" border="0" align="center" width="100%" class="tborder">
<tr class="windowbg2">
<td align="center" width="100%" >';
if(empty($modSettings['gallery_url']))
{
$modSettings['gallery_url'] = $boardurl . '/gallery/';
}
$dbresult = db_query("SELECT p.ID_PICTURE, p.commenttotal, p.filesize, p.views, p.thumbfilename, p.title, p.ID_MEMBER, m.memberName, m.realName, p.date, p.description FROM {$db_prefix}gallery_pic as p, {$db_prefix}members AS m WHERE p.ID_MEMBER = m.ID_MEMBER AND p.approved = 1 ORDER BY date DESC LIMIT 5", __FILE__, __LINE__);
$rowlevel = 0;
while($row = mysql_fetch_assoc($dbresult))
{
if($rowlevel == 0)
echo '<center><td align="center" width="100%" ><span class="img-shadow"><a href="' . $scripturl . '?action=gallery;sa=view;id=' . $row['ID_PICTURE'] . '"><img src="' . $modSettings['gallery_url'] . $row['thumbfilename'] . '" border="0" /></a></span><br />';
echo ' <td align="center" width="100%" ><span class="smalltext">' . $txt['gallery_text_views'] . $row['views'] . '<br />';
echo $txt['gallery_text_filesize'] . round($row['filesize'] / 1024, 2) . 'KB<br />';
echo $txt['gallery_text_date'] . timeformat($row['date']) . '<br />';
echo $txt['gallery_text_comments'] . ' (<a href="' . $scripturl . '?action=gallery;sa=view;id=' . $row['ID_PICTURE'] . '">' . $row['commenttotal'] . '</a>)<br />';
echo $txt['gallery_text_by'] . ' <a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['realName'] . '</a><br />';
echo '</span>';
}
echo'</td></tr></center>';
echo'</table></br>';
mysql_free_result($dbresult);
Popular/Top 5 Most Viewed-
Code:
echo'
<table cellspacing="0" cellpadding="5" border="0" align="center" width="100%" class="tborder">
<tr class="titlebg">
<td align="center" width="100%" >Popular</td>
</tr></table>
<table cellspacing="0" cellpadding="5" border="0" align="center" width="100%" class="tborder">
<tr class="windowbg2">
<td align="center">';
if(empty($modSettings['gallery_url']))
{
$modSettings['gallery_url'] = $boardurl . '/gallery/';
}
$dbresult = db_query("SELECT p.ID_PICTURE, p.commenttotal, p.filesize, p.views, p.thumbfilename, p.title, p.ID_MEMBER, m.memberName, m.realName, p.date, p.description FROM {$db_prefix}gallery_pic as p, {$db_prefix}members AS m WHERE p.ID_MEMBER = m.ID_MEMBER AND p.approved = 1 ORDER BY views DESC LIMIT 5", __FILE__, __LINE__);
$rowlevel = 0;
while($row = mysql_fetch_assoc($dbresult))
{
if($rowlevel == 0)
echo '<center><td align="center" ><span class="img-shadow"><a href="' . $scripturl . '?action=gallery;sa=view;id=' . $row['ID_PICTURE'] . '"><img src="' . $modSettings['gallery_url'] . $row['thumbfilename'] . '" border="0" /></a></span><br />';
echo ' <td align="center" width="100%" ><span class="smalltext">' . $txt['gallery_text_views'] . $row['views'] . '<br />';
echo $txt['gallery_text_filesize'] . round($row['filesize'] / 1024, 2) . 'KB<br />';
echo $txt['gallery_text_date'] . timeformat($row['date']) . '<br />';
echo $txt['gallery_text_comments'] . ' (<a href="' . $scripturl . '?action=gallery;sa=view;id=' . $row['ID_PICTURE'] . '">' . $row['commenttotal'] . '</a>)<br />';
echo $txt['gallery_text_by'] . ' <a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['realName'] . '</a><br />';
echo '</span>';
}
echo'</td></tr></center>';
echo'</table></br>';
mysql_free_result($dbresult);
this just doesn't work for me and i did everthing that was asked?
Logged
Pages:
1
[
2
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
SMFHacks.com
-----------------------------
=> News
=> Site Discussion
===> Suggestions
===> Bugs
-----------------------------
SMF Gallery Pro
-----------------------------
=> Announcements
=> Presales
=> Support
===> Bugs
===> Feature Requests
-----------------------------
SMF Store
-----------------------------
=> Announcements
=> Presales
=> Support
===> Guides and Tips
===> Feature Requests
===> Bugs
-----------------------------
SMF Classifieds
-----------------------------
=> Announcements
=> Presales
=> Support
===> Bugs
===> Feature Requests
-----------------------------
Downloads System Pro
-----------------------------
=> Announcements
=> Presales
=> Support
===> Feature Requests
===> Bugs
-----------------------------
Ad Seller Pro
-----------------------------
=> Presales
=> Support
-----------------------------
Menu Editor Pro
-----------------------------
=> Presales Menu Editor Pro
=> Bug Reports
-----------------------------
Inline Personal Messages
-----------------------------
=> Presales
=> Support
=> Bug Reports
-----------------------------
Newsletter Pro
-----------------------------
=> Presales
=> Support
===> Feature Requests
-----------------------------
Badge Awards
-----------------------------
=> Presales
=> Support
-----------------------------
Tweet Topics/FB Post System
-----------------------------
=> Presales
-----------------------------
Social Login Pro
-----------------------------
=> Presales
-----------------------------
SMF Gallery Lite
-----------------------------
=> SMF Gallery Lite
-----------------------------
Modifications/Themes
-----------------------------
=> General SMF Forum
=> Modifications Talk
===> Latest Mods
===> Modification Showcase
=> Theme Talk
===> Theme Showcase
===> Latest Themes
Recent
Feature Requests for SMF ...
by
Secure
[May 16, 2013, 10:13:46 pm]
stuck on "Processing" scr...
by
SMFHacks
[May 15, 2013, 11:32:14 pm]
[Request] - Award for any...
by
SMFHacks
[May 15, 2013, 11:31:24 pm]
SMF Gallery Pro 5.0.1 not...
by
SMFHacks
[May 12, 2013, 09:10:43 am]
Golf Theme
by
Serglike
[May 10, 2013, 03:49:55 am]
Display ads on every page...
by
SMFHacks
[May 07, 2013, 07:12:40 pm]
Edited simple ad code and...
by
ApplianceJunk
[May 07, 2013, 02:37:14 pm]
"non" error on bulk uploa...
by
SMFHacks
[May 06, 2013, 10:29:56 pm]
Can I give member an ad p...
by
fernowl
[May 04, 2013, 03:22:01 pm]
How to configure the Auto...
by
SMFHacks
[May 04, 2013, 01:08:57 pm]
Random Picture
Donate to SMFHacks.com
Help Support the SMFHacks.com mod making.
Loading...