SMF Gallery

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

Previous topic - Next topic

vbgamer45

Community Suite for SMF - Grow your forum with 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

Dr. Jay Sin

PERFECTION!  I see where you made the change.

Thanks again for your patience, vbgamer45!  ;D

vbgamer45

Thanks glad to help. A good tool to check out changes I recommend Beyond Compare free trial too.
Community Suite for SMF - Grow your forum with 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

Dr. Jay Sin

Looks sweet!  Totally bookmarked that.  Looks worth considering for a purchase after the trial, I'll have to check it out.  :)

reefforum

How difficult would it be for members to receive auto PM every time a comment is posted on their photos?

vbgamer45

Not difficult to do. Would need to be a setting though in case some members don't want a pm.
Community Suite for SMF - Grow your forum with 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

reefforum

Quote from: vbgamer45 on December 20, 2011, 10:12:02 AM
Not difficult to do. Would need to be a setting though in case some members don't want a pm.

Any chance you could tell me how to do it?

vbgamer45

You would need to modify the AddComment2 function in the Gallery.php
And then use the sendpm function to send the pm.
Community Suite for SMF - Grow your forum with 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

e85prices

Hello ..I've searched but cant seem to find how to make Gallery Comments Available in the "most recent" comments for the Forum

vbgamer45

Requires an addon but I can do what SMF version?
Community Suite for SMF - Grow your forum with 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

e85prices


vbgamer45

Code attached you need to do manual edits back ported from Gallery Pro to lite try it if it works

<file name="$languagedir/Modifications.english.php">
<operation>
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
//Begin SMF Gallery  Recent Comments Board Index Mod Strings
$txt['gallerymod_recent_comment'] = 'Recent Comments';
$txt['gallerymod_guest'] = 'Guest';
//END SMF Gallery  Recent Comments Board Index Mod Strings
]]></add>
</operation>
</file>

<file name="$languagedir/Modifications.english-utf8.php" error="skip">
<operation>
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
//Begin SMF Gallery  Recent Comments Board Index Mod Strings
$txt['gallerymod_recent_comment'] = 'Recent Comments';
$txt['gallerymod_guest'] = 'Guest';
//END SMF Gallery  Recent Comments Board Index Mod Strings
]]></add>
</operation>
</file>



<file name="$sourcedir/BoardIndex.php">
<operation>
<search position="after"><![CDATA[$settings['display_recent_bar'] = !empty($settings['number_recent_posts']) ? $settings['number_recent_posts'] : 0;]]></search>
<add><![CDATA[
// Start SMF Gallery Recent Comments Board Index Mod

global $smcFunc;
$dbresult = $smcFunc['db_query']('', "
SELECT
p.ID_PICTURE, p.ID_CAT, p.title, c.ID_MEMBER, c.comment, c.date,
m.real_name, a.title catname, c.ID_COMMENT
FROM ({db_prefix}gallery_comment AS c, {db_prefix}gallery_pic as p)
LEFT JOIN  {db_prefix}gallery_cat AS a ON (a.ID_CAT = p.ID_CAT)
LEFT JOIN {db_prefix}members AS m ON (c.ID_MEMBER = m.ID_MEMBER)
WHERE  c.ID_PICTURE = p.ID_PICTURE AND c.approved = 1 ORDER BY c.ID_COMMENT DESC LIMIT 10");

$context['gallery_comindex'] = array();
while($row = $smcFunc['db_fetch_assoc']($dbresult))
{
$context['gallery_comindex'][] = array(
'ID_PICTURE' => $row['ID_PICTURE'],
'ID_COMMENT' => $row['ID_COMMENT'],
'title' => $row['title'],
'ID_CAT' => $row['ID_CAT'],
'ID_MEMBER' =>  $row['ID_MEMBER'],
'real_name' => $row['real_name'],
'catname' => $row['catname'],
'comment' => $row['comment'],
'date' => timeformat($row['date']),
);

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

// END SMF Gallery Recent Comments Board Index Mod

]]>
</add>
</operation>
</file>
<file name="$themedir/BoardIndex.template.php">
<operation>
<search position="after"><![CDATA[// Show information about events, birthdays, and holidays on the calendar.]]></search>
<add><![CDATA[
//SMF Gallery Recent Comments Board Index Mod




echo '
<div class="infocenter_section">
<h4 class="headerpadding titlebg">', $txt['gallerymod_recent_comment'], '</h4>
<div class="windowbg">
<p class="section">
<img src="', $settings['images_url'], '/post/xx.gif" alt="',$txt['gallerymod_recent_comment'], '" />
</p>
';


// Show Comments

echo '<div class="windowbg2 sectionbody hslice clearfix" id="recent_posts_content">
<dl id="infocenter_recentposts" class="middletext">';

global $smcFunc;
foreach ($context['gallery_comindex'] as $pic)
{

echo '
<dt><strong><a href="' . $scripturl . '?action=gallery;sa=view;id=' . $pic['ID_PICTURE'] . '#c' . $pic['ID_COMMENT'] . '">' . (strlen($pic['comment']) > 50 ? $smcFunc['substr']($pic['comment'], 0, 50)  . '...' : substr($pic['comment'], 0, 50))  . '</a></strong> ', $txt['by'], ' ', ($pic['real_name'] != '' ?  '<a href="' . $scripturl . '?action=profile;u=' . $pic['ID_MEMBER'] . '">' . $pic['real_name'] . '</a>' : $txt['gallerymod_guest']) . ' (<a href="' . $scripturl . '?action=gallery;cat=' . $pic['ID_CAT'] . '">' . $pic['catname'] . '</a>)</dt>
<dd>', $pic['date'], '</dd>';


}



echo '
</dl>';

echo '
</div>
</div>
</div>';




//End SMF Gallery Recent Comments Board Index Mod

]]>
</add>
</operation>
</file>
Community Suite for SMF - Grow your forum with 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

e85prices

Quote from: vbgamer45 on December 20, 2011, 07:46:30 PM
Code attached you need to do manual edits back ported from Gallery Pro to lite try it if it works

<file name="$languagedir/Modifications.english.php">
<operation>
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
//Begin SMF Gallery  Recent Comments Board Index Mod Strings
$txt['gallerymod_recent_comment'] = 'Recent Comments';
$txt['gallerymod_guest'] = 'Guest';
//END SMF Gallery  Recent Comments Board Index Mod Strings
]]></add>
</operation>
</file>

<file name="$languagedir/Modifications.english-utf8.php" error="skip">
<operation>
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
//Begin SMF Gallery  Recent Comments Board Index Mod Strings
$txt['gallerymod_recent_comment'] = 'Recent Comments';
$txt['gallerymod_guest'] = 'Guest';
//END SMF Gallery  Recent Comments Board Index Mod Strings
]]></add>
</operation>
</file>



<file name="$sourcedir/BoardIndex.php">
<operation>
<search position="after"><![CDATA[$settings['display_recent_bar'] = !empty($settings['number_recent_posts']) ? $settings['number_recent_posts'] : 0;]]></search>
<add><![CDATA[
// Start SMF Gallery Recent Comments Board Index Mod

global $smcFunc;
$dbresult = $smcFunc['db_query']('', "
SELECT
p.ID_PICTURE, p.ID_CAT, p.title, c.ID_MEMBER, c.comment, c.date,
m.real_name, a.title catname, c.ID_COMMENT
FROM ({db_prefix}gallery_comment AS c, {db_prefix}gallery_pic as p)
LEFT JOIN  {db_prefix}gallery_cat AS a ON (a.ID_CAT = p.ID_CAT)
LEFT JOIN {db_prefix}members AS m ON (c.ID_MEMBER = m.ID_MEMBER)
WHERE  c.ID_PICTURE = p.ID_PICTURE AND c.approved = 1 ORDER BY c.ID_COMMENT DESC LIMIT 10");

$context['gallery_comindex'] = array();
while($row = $smcFunc['db_fetch_assoc']($dbresult))
{
$context['gallery_comindex'][] = array(
'ID_PICTURE' => $row['ID_PICTURE'],
'ID_COMMENT' => $row['ID_COMMENT'],
'title' => $row['title'],
'ID_CAT' => $row['ID_CAT'],
'ID_MEMBER' =>  $row['ID_MEMBER'],
'real_name' => $row['real_name'],
'catname' => $row['catname'],
'comment' => $row['comment'],
'date' => timeformat($row['date']),
);

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

// END SMF Gallery Recent Comments Board Index Mod

]]>
</add>
</operation>
</file>
<file name="$themedir/BoardIndex.template.php">
<operation>
<search position="after"><![CDATA[// Show information about events, birthdays, and holidays on the calendar.]]></search>
<add><![CDATA[
//SMF Gallery Recent Comments Board Index Mod




echo '
<div class="infocenter_section">
<h4 class="headerpadding titlebg">', $txt['gallerymod_recent_comment'], '</h4>
<div class="windowbg">
<p class="section">
<img src="', $settings['images_url'], '/post/xx.gif" alt="',$txt['gallerymod_recent_comment'], '" />
</p>
';


// Show Comments

echo '<div class="windowbg2 sectionbody hslice clearfix" id="recent_posts_content">
<dl id="infocenter_recentposts" class="middletext">';

global $smcFunc;
foreach ($context['gallery_comindex'] as $pic)
{

echo '
<dt><strong><a href="' . $scripturl . '?action=gallery;sa=view;id=' . $pic['ID_PICTURE'] . '#c' . $pic['ID_COMMENT'] . '">' . (strlen($pic['comment']) > 50 ? $smcFunc['substr']($pic['comment'], 0, 50)  . '...' : substr($pic['comment'], 0, 50))  . '</a></strong> ', $txt['by'], ' ', ($pic['real_name'] != '' ?  '<a href="' . $scripturl . '?action=profile;u=' . $pic['ID_MEMBER'] . '">' . $pic['real_name'] . '</a>' : $txt['gallerymod_guest']) . ' (<a href="' . $scripturl . '?action=gallery;cat=' . $pic['ID_CAT'] . '">' . $pic['catname'] . '</a>)</dt>
<dd>', $pic['date'], '</dd>';


}



echo '
</dl>';

echo '
</div>
</div>
</div>';




//End SMF Gallery Recent Comments Board Index Mod

]]>
</add>
</operation>
</file>


vb excuse my ignorance but which file am I making the changes too?  I dont see where Gallery.php , modifications.english.php, BoardIndex.php ? 

vbgamer45

Community Suite for SMF - Grow your forum with 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

e85prices

#3034
Quote from: vbgamer45 on December 20, 2011, 08:22:19 PM
Put a package together untested try it out.

Modification parse error

VB I Installed anyways..not seeing any changes..any permissions/settings I may need to change?

vbgamer45

Community Suite for SMF - Grow your forum with 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

e85prices

Quote from: vbgamer45 on December 20, 2011, 08:38:31 PM
Uninstall old version and delete and try this

OK that installed without any parse errors..once installed  made  a test comment and where my "recent comments" are at the bottom of the page we know get this .. http://e85vehicles.com/images/testcomments.PNG [nofollow]

I'l keep testing if you want..or we can try another time

vbgamer45

Not sure what that is in the image....That does not look like any of the code from the addon looks like something custom.
Community Suite for SMF - Grow your forum with 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

e85prices

Quote from: vbgamer45 on December 20, 2011, 08:49:45 PM
Not sure what that is in the image....That does not look like any of the code from the addon looks like something custom.

Interesting because I just checked that area (that's where regular form recent posts are (not the sp recent post)) before installing and recent posts was there.. I unistalled the last zip ..and deleted but still there...I do have backup copies ..which backups should I revert to to see if that fixes it?  boardindex?

e85prices

Quote from: vbgamer45 on December 20, 2011, 08:49:45 PM
Not sure what that is in the image....That does not look like any of the code from the addon looks like something custom.

my bad VB.. I have no Idea how that SP text block came active.. anyway got rid of that..  I'll reinstall that last zip again

Advertisement: