News:

Join the Facebook Fan Page.

Main Menu

SMF Gallery

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

Previous topic - Next topic

ozoknar

Can Gallery mod ???
do, show all my topics , replies ...vs  and messages  with any picture type on main forum page in thumbnail box or mini box  and users can click image to go  view page....( go topic )
?????

or Any mod released for this applications?
thanks
SMF 1.1.3

default tema

Modlarım;
SMF 1.0.11 / 1.1.3 Update    1.1
YouTube BBC Tag (XHTML Compliant)    1.0       SMF Gallery Lite    1.8

TrueSatan

@ ozoknar

No, not currently and I rather doubt that that would fall within its scope...also I know of no other mod that would do anything close to what I think you are describing...the impact on page load speed would also be rather an issue if it were to be done.

Kenny01

Please help,
I'm having two galery buttons on my forum since i delete the former file from the package and reinstall it.

Please how do i remove one of the galery button from my forum ? please click on the link to see what i'm talking about http://hyippolice01.com/worldforum/index.php your help will be well appreciate, THANKS.


TrueSatan

 You will have to edit index.template .php...look for the following code:

$current_action = 'admin';
if (in_array($context['current_action'], array(


Following that you will find:

'gallery',

You should have one instance only of the second code above...edit to remove extra instances.

Find:

'allow_memberlist'])
echo ($current_action == 'mlist' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'mlist' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a>
</td>' , $current_action == 'mlist' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


Following that you will find:


// 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>' : '';



Once more edit to remove extra instances of the second code block.

It is possible that you may have other duplicate code in other files so please go to:

http://modparser.dev.dansoftaustralia.net/

...and input the mod into it...based on the output of that site please check all the files it mentions to see that the edits it mentions have not been duplicated.

Kenny01

God bless you problem solved

TrueSatan


Kenny01

#846
Please can you help me again with this INVITATION PROBLEM

Gentlemen please I need help,
I'm geting this error message each time i try to send new invitation " Sorry, the invite key could not be sent (already sent maybe?)"
It started just after i installed galery to my forum, i uninstalled the galery but the problem still remain, please help because most of members are by invitation, I'm using SMF 1.1.3 Defaut theme.

THANKS.

TrueSatan

Would I be right in thinking that you are using the following mod:

http://custom.simplemachines.org/mods/index.php?mod=653

...if so the code of that may also have been subject to duplications as was your Gallery code...please use the same site as I gave above to check the files it edits and adds removing any duplications as you go...if that mod is what you are using please post to the topic on this board relating to the mod...you will get proper support for it that way.

Kenny01

I have check the index php their is no invitation duplication.

TrueSatan

If you are using the mod I refered to above your query needs to be stated on the topic for that mod...I'm sorry but this is the topic for the SMF Gallery and we can't answer Invite mod queries here.

Kenny01

I have posted it in invite board still no reply, but thanks for your help.

TrueSatan

Please remember we're all volunteers here and giving up our free time to help...also it is a Sunday...be patient and you should get a reply.

Kenny01


Mettafix

Is there any way to mass upload pictures into SMF Gallery,like using some FTP client etc.(without upgrading to pro version).

Kenny01

Please how do i use Parser

In file $boarddir/index.php
Find: &nbsp;
      'jsoption' => array('Themes.php', 'SetJavaScript'),


Add before:

      'invite' => array('Invite.php', 'InviteMain'),



In file $sourcedir/ModSettings.php
Find: &nbsp;
   $context['sub_template'] = 'show_settings';

   $subActions = array(


Add after:
      'invite' => 'ModifyInviteSettings',



Find: &nbsp;
   require_once($sourcedir . '/ManageServer.php');

   $subActions = array(


Add after:
      'invite' => 'ModifyInviteSettings',



Find: &nbsp;
         'layout' => array(
            'title' => $txt['mods_cat_layout'],
            'href' => $scripturl . '?action=featuresettings;sa=layout;sesc=' . $context['session_id'],
         ),


Add after:

         'invite' => array(
            'title' => $txt['invite_title'],
            'href' => $scripturl . '?action=featuresettings;sa=invite;sesc=' . $context['session_id'],
         ),



Find: &nbsp;
function ModifyKarmaSettings()


Add before:

// Invite MOD
function ModifyInviteSettings()
{
   global $sourcedir;
   require_once($sourcedir . '/Invite.php');
   InviteSettings();
}





In file $sourcedir/ManagePermissions.php
Find: &nbsp;
   $groupLevels['global']['restrict'] = array(


Add after:
      'invitees_any',



Find: &nbsp;
   $groupLevels['global']['standard'] = array_merge($groupLevels['global']['restrict'], array(


Add after:
      'invite',
      'invite_unlimited',
      'invitees_own',



Find: &nbsp;
         'pm' => array(
            'pm_read' => false,
            'pm_send' => false,
         ),


Add after:
         'invite' => array(
            'invite' => false,
            'invite_unlimited' => false,
            'invitees' => true,
         ),



Find: &nbsp;
   $non_guest_permissions = array(


Add after:
      'invite',
      'invite_unlimited',




In file $sourcedir/Register.php
Find: &nbsp;
   // Check if the administrator has it disabled.
   if (!empty($modSettings['registration_method']) && $modSettings['registration_method'] == 3)
      fatal_lang_error('registration_disabled', false);



Add after:

   // Invite MOD; check if we're only accepting invites, and if so check for a valid invite key.
   global $sourcedir;
   require_once($sourcedir . '/Invite.php');
   $context['invite_key'] = validateInviteKey(empty($_REQUEST['invite_key']) ? '' : $_REQUEST['invite_key'], !empty($modSettings['invite_only']));




Find: &nbsp;
   // You can't register if it's disabled.
   if (!empty($modSettings['registration_method']) && $modSettings['registration_method'] == 3)
      fatal_lang_error('registration_disabled', false);



Add after:

   // Invite MOD; check if we're only accepting invites, and if so check for a valid invite key.
   global $sourcedir;
   require_once($sourcedir . '/Invite.php');
   $context['invite_key'] = validateInviteKey(empty($_REQUEST['invite_key']) ? '' : $_REQUEST['invite_key'], !empty($modSettings['invite_only']));




Find: &nbsp;
   $memberID = registerMember($regOptions);


Add after:


   // Invite MOD; looks like registration went ok, let's mark the invite key as used and who it was used by.
   if ($context['invite_key'] !== false)
   {
      db_query("
         UPDATE {$db_prefix}invites
         SET ID_REGISTRATION = '$memberID'
         WHERE inviteKey = '{$context['invite_key']}'
         LIMIT 1", __FILE__, __LINE__);
   }
   elseif (!empty($_REQUEST['inviter']) && (int)$_REQUEST['inviter'] !== 0)
   {
      db_query("
         INSERT INTO {$db_prefix}invites (ID_MEMBER, ID_REGISTRATION, inviteTime)
         VALUES ('" . (int)$_REQUEST['inviter'] . "', '$memberID', " . time() . ")
         ", __FILE__, __LINE__);
   }




In file $sourcedir/Memberlist.php
Find: &nbsp;
   // They're searching..
   if (isset($_REQUEST['search']) && isset($_REQUEST['fields']))


Replace with:

   // Invite MOD. &nbsp;Not really a user search, just using the fine table and such that's already here for the invitees list...
   if (isset($_REQUEST['inviter']) && loadMemberData(array($_REQUEST['inviter'])))
   {
      global $user_profile;

      if (($_REQUEST['inviter'] == $context['user']['id'] && !allowedTo('invitees_own')) || !allowedTo('invitees_any'))
         fatal_lang_error('invitees_any', false);

      // Just to let the members know it's not really a search.
      $context['page_title'] = $txt['invited_by'] . ' ' . $user_profile[$_REQUEST['inviter']]['realName'];
      $context['sort_links'][1]['label'] = $context['page_title'];

      // We need this so it thinks it's a regular search and won't be all ******y about variables...
      $context['old_search'] = '';
      $context['old_search_value'] = '';

      // Find the number of results.
      $request = db_query("
         SELECT COUNT(*)
         FROM {$db_prefix}members AS mem
            LEFT JOIN {$db_prefix}invites AS inv ON (inv.ID_REGISTRATION = mem.ID_MEMBER)
         WHERE inv.ID_MEMBER = $_REQUEST[inviter]
            AND is_activated = 1", __FILE__, __LINE__);
      list ($numResults) = mysql_fetch_row($request);
      mysql_free_result($request);

      $context['page_index'] = constructPageIndex($scripturl . '?action=mlist;sa=search;inviter=' . $_GET['inviter'], $_REQUEST['start'], $numResults, $modSettings['defaultMaxMembers']);

      // Find the members from the database.
      // !!!SLOW This query is slow.
      $request = db_query("
         SELECT mem.ID_MEMBER
         FROM {$db_prefix}members AS mem
            LEFT JOIN {$db_prefix}invites AS inv ON (inv.ID_REGISTRATION = mem.ID_MEMBER)
            LEFT JOIN {$db_prefix}log_online AS lo ON (lo.ID_MEMBER = mem.ID_MEMBER)
            LEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = IF(mem.ID_GROUP = 0, mem.ID_POST_GROUP, mem.ID_GROUP))
         WHERE inv.ID_MEMBER = $_REQUEST[inviter]
            AND is_activated = 1
         LIMIT $_REQUEST[start], $modSettings[defaultMaxMembers]", __FILE__, __LINE__);
      printMemberListRows($request);
      mysql_free_result($request);
   } // End Invite MOD.
   // They're really doing a search.
   elseif (isset($_REQUEST['search']) && isset($_REQUEST['fields']))




In file $sourcedir/Stats.php
Find: &nbsp;
   // Activity by month.


Add before:

   // Invite MOD. &nbsp;Top 10 Inviters.
   global $sourcedir;
   require_once($sourcedir . '/Invite.php');
   InviteStats();
   // End Invite MOD.





In file $sourcedir/Profile.php
Find: &nbsp;
      // This block is only concerned with email address validation..


Add before:

      // Invite MOD. &nbsp;Change the number of inviter.
      if (!empty($_POST['inviter']) && (int)$_POST['inviter'] != 0 && (int)$_POST['inviter'] != $memID && allowedTo('moderate_forum'))
      {
         global $sourcedir;
         require_once($sourcedir . '/Invite.php');

         if (inviter($memID))
            db_query("
               UPDATE {$db_prefix}invites SET ID_MEMBER = {$_POST['inviter']}
               WHERE ID_REGISTRATION = $memID
               LIMIT 1", __FILE__, __LINE__);
         else
            db_query("
               INSERT INTO {$db_prefix}invites (ID_MEMBER, ID_REGISTRATION)
                  VALUES ({$_POST['inviter']}, $memID)", __FILE__, __LINE__);
      }
      elseif (isset($_POST['inviter']) && empty($_POST['inviter']))
      {
         db_query("
            DELETE FROM {$db_prefix}invites
            WHERE ID_REGISTRATION = $memID
            LIMIT 1", __FILE__, __LINE__);
      }





In file $themedir/index.template.php
Find: )))
      $current_action = $context['current_action'];

Add before:
, 'invite'


Find: &nbsp;
   // If the user is a guest, show [login] button.


Add before:

   // Invite MOD.
   if (allowedTo('invite'))
   {
      global $modSettings;
      echo ($current_action == 'invite' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
            <td valign="top" class="maintab_' , $current_action == 'invite' ? 'active_back' : 'back' , '">
               <a href="', $scripturl, '?action=invite">' , (!empty($modSettings['invite_menu_title']) ? $modSettings['invite_menu_title'] : $txt['invite_title']) , '</a>
            </td>' , $current_action == 'invite' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';
   }





In file $themedir/Profile.template.php
Find: &nbsp;
               <td>', $context['member']['registered'], '</td>
            </tr><tr>
               <td><b>', $txt['lastLoggedIn'], ': </b></td>


Replace with:

               <td>', $context['member']['registered'], '</td>
            </tr>';

   // Invite MOD.
   global $sourcedir;
   require_once($sourcedir . '/Invite.php');
   if (($context['user']['is_owner'] && allowedTo('invitees_own')) || allowedTo('invitees_any'))
   {
      if (inviter($context['member']['id']))
         echo '
            <tr>
               <td><b>', $txt['invited_by'], ': </b></td>
               <td><a href="', $scripturl, '?action=profile;u=', $context['member']['invited_by'], '">', $context['member']['invited_by_name'], '</a></td>
            </tr>';

      if ($context['member']['invitees_count'] = invitees($context['member']['id']))
         echo '
            <tr>
               <td><b>', $txt['invitees_count'], ': </b></td>
               <td><a href="', $scripturl, '?action=mlist;sa=search;inviter=', $context['member']['id'], '">', $context['member']['invitees_count'], '</a></td>
            </tr>';
   }
   // End Invite MOD.

   echo '
            <tr>
               <td><b>', $txt['lastLoggedIn'], ': </b></td>



Find: &nbsp;
      // Only display if admin has enabled "user selectable language".


Add before:

      // Invite MOD. &nbsp;Allow the administrator to change the inviter.
      if ($context['user']['is_admin'])
      {
         global $sourcedir;
         require_once($sourcedir . '/Invite.php');
         echo '
                     <tr>
                        <td><b>', $txt['invited_by'], ' (ID): </b></td>
                        <td><input type="text" name="inviter" size="4" value="', inviter($context['member']['id']), '" /></td>
                     </tr>';
      }





In file $themedir/Stats.template.php
Find: &nbsp;
         </tr><tr>
            <td class="catbg" colspan="4"><b>', $txt['smf_stats_5'], '</b></td>


Replace with:

         </tr><tr>
            <td class="catbg" colspan="2" width="50%"><b>', $txt['top_inviters'], '</b></td>
            <td class="catbg" colspan="2" width="50%"><b>', $txt['top_inviters_by_posts'], '</b></td>
         </tr><tr>
            <td class="windowbg" width="20" valign="middle" align="center"><img src="', $settings['images_url'], '/stats_posters.gif" width="20" height="20" alt="" /></td>
            <td class="windowbg2" width="50%" valign="top">
               <table border="0" cellpadding="1" cellspacing="0" width="100%">';
   foreach ($context['top_inviters'] as $inviter)
      echo '
                  <tr>
                     <td width="60%" valign="top">', $inviter['link'], '</td>
                     <td width="20%" align="left" valign="top">', $inviter['num'] > 0 ? '<img src="' . $settings['images_url'] . '/bar.gif" width="' . $inviter['percent'] . '" height="15" alt="" />' : '&nbsp;', '</td>
                     <td width="20%" align="right" valign="top">', $inviter['num'], '</td>
                  </tr>';
   echo '
               </table>
            </td>
            <td class="windowbg" width="20" valign="middle" align="center" nowrap="nowrap"><img src="', $settings['images_url'], '/stats_posters.gif" width="20" height="20" alt="" /></td>
            <td class="windowbg2" width="50%" valign="top">
               <table border="0" cellpadding="1" cellspacing="0" width="100%">';
   foreach ($context['top_inviters_by_posts'] as $inviter)
      echo '
                  <tr>
                     <td width="60%" valign="top">', $inviter['link'], '</td>
                     <td width="20%" align="left" valign="top">', $inviter['num'] > 0 ? '<img src="' . $settings['images_url'] . '/bar.gif" width="' . $inviter['percent'] . '" height="15" alt="" />' : '&nbsp;', '</td>
                     <td width="20%" align="right" valign="top">', $inviter['num'], '</td>
                  </tr>';
   echo '
               </table>
            </td>
         </tr><tr>
            <td class="catbg" colspan="4"><b>', $txt['smf_stats_5'], '</b></td>




In file $themedir/Register.template.php
Find: &nbsp;
   echo '
   <br />
   <div align="center">
      <input type="submit" name="regSubmit" value="', $txt[97], '" />
   </div>


Add before:

   // Invite MOD
   if (!empty($context['invite_key']))
      echo '
   <input type="hidden" name="invite_key" value="', $context['invite_key'], '" />';
   elseif (!empty($_REQUEST['inviter']) && (int)$_REQUEST['inviter'] !== 0)
      echo '
   <input type="hidden" name="inviter" value="', $_REQUEST['inviter'], '" />';





In file $languagedir/Modifications.english.php
Find: &nbsp;
?>

Add before:


// Invite MOD.
$txt['invite_title'] = 'Invite';
$txt['invite_only'] = 'Only allow registrations through invitation.';
$txt['invite_menu_title'] = 'Invite menu title.';
$txt['invite_days'] = 'Number of days for members to get a new invite credit.<div class="smalltext">(0 for no limit, admins are exempt)</div>';
$txt['invite_max'] = 'Max number of invite credits.<div class="smalltext">(0 for no limit, admins are exempt)</div>';
$txt['invite_expire'] = 'Number of days for an invite key to be valid.<div class="smalltext">(0 for no limit)</div>';
$txt['invite_group_settings'] = 'Set group permission for sending invites';

$txt['invite_email_disable'] = 'Disable mailing feature.';
$txt['invite_email_subject'] = 'E-mail subject.';
$txt['invite_email_message'] = 'E-mail message.
<div class="smalltext">{invitee} = Recipient\'s name</div>
<div class="smalltext">{inviter} = Inviter\'s memebername</div>
<div class="smalltext">{forum} = Forum name</div>
<div class="smalltext">{link} = Link to registration page (with key)</div>
<div class="smalltext">{message} = Message by inviter</div>';
$txt['invite_default_email_subject'] = '{invitee}, you have received an invitation to {forum} by {inviter}!';
$txt['invite_default_email_message'] = 'Hi {invitee},

You have received an invitation to {forum}, click the following link to register:

{link}

{inviter} also sent this comment to you:

{message}


This message is not spam.';

$txt['invite_someone'] = 'Invite someone';
$txt['invite_info'] = 'You can invite someone new if you have invite credits by making a new key and sending them the link.';
$txt['invite_link'] = 'You can invite someone new by sending them the following link.';
$txt['invitees'] = 'Invitees';
$txt['invitees_info'] = 'The following list which members you have invited.';
$txt['no_invitees'] = 'There are no invitees to display';
$txt['invite_unlimited'] = 'unlimited';
$txt['invite_max_reached'] = 'max reached';
$txt['make_new_invite_key'] = 'Make new invite key';
$txt['invite_credits'] = 'Invite credits';
$txt['next_invite_credit'] = 'Next credit';
$txt['invite_key'] = 'Invite Key';
$txt['invite_email'] = 'Invitation E-mail';
$txt['invite_send_email'] = 'Send invitation e-mail';
$txt['invite_expires'] = 'Expires';
$txt['invited_by'] = 'Invited by';
$txt['invitees_count'] = 'Members invited';
$txt['show_invitees'] = 'Show members invited by this person';


$txt['invite_email_info'] = 'Enter the name and email of the person you wish to invite, and the invite link will be sent to them.';
$txt['invite_recipient_name'] = 'Recipient\'s name';
$txt['invite_recipient_email'] = 'Recipient\'s e-mail';
$txt['invite_message'] = 'Personal message to recipient';
$txt['invite_sent'] = 'The invitation has been sent.';

$txt['invite_no_name'] = 'You did not enter a name.';
$txt['invite_no_email'] = 'You did not enter a valid e-mail address.';
$txt['cannot_send_invite'] = 'Sorry, the invite key could not be sent (already sent maybe?).';

$txt['permissiongroup_invite'] = 'Invite';
$txt['permissionname_invite'] = 'Invite';
$txt['permissionhelp_invite'] = 'When the forum is set to accept registrations by invitation only, this permission will allow a membergroup to invite people to the forum so they can register.';
$txt['permissionname_invite_unlimited'] = 'Unlimted invite credits';
$txt['permissionhelp_invite_unlimited'] = 'When the forum is set to accept registrations by invitation only, this permission will allow a membergroup to have unlimited invite credits.';
$txt['permissionname_invitees'] = 'View invitees';
$txt['permissionhelp_invitees'] = 'This will show a list of members that the user has invited to the forum using the Invite MOD.';
$txt['permissionname_invitees_own'] = 'Own invitees';
$txt['permissionname_invitees_any'] = 'Any invitees';

$txt['cannot_invite'] = 'Sorry, you\'re not allowed to send invitations.';
$txt['cannot_invite_as_other'] = 'Sorry, you can\'t send invitations as someone else.';
$txt['cannot_invitees_any'] = 'Sorry, you\'re not allowed to view this member\'s invitees.';
$txt['registration_invite_only'] = 'Sorry, registration is by invitation only.<br /><br />If you have a valid invite key enter it below:<br /><form method="POST" action="index.php?action=register"><input type="text" name="invite_key" size="40"> <input type="submit" value="Register"></form>';
$txt['registration_invite_expired'] = 'Sorry, the invite key has expired.';

$txt['top_inviters'] = 'Top Inviters (by Invitees)';
$txt['top_inviters_by_posts'] = 'Top Inviters (by Invitees\' Posts)';
// End Invite MOD.

TrueSatan

Quote from: Mettafix on July 29, 2007, 04:16:08 PM
Is there any way to mass upload pictures into SMF Gallery,like using some FTP client etc.(without upgrading to pro version).

No...that's why people pay for the pro version.

TrueSatan

@ Oga 123

Really this is not the support topic for the invite mod and the query you are asking is about the code from that mod...your question belongs in the topic for the invite mod!

If you read through what you posted you will find that the exact details of what you need to find etc are stated...you follow those instructions.

I feel that the only way I can avoid contributing to taking this discussion off topic (the correct topic being SMF Gallery) is to decline to reply here to any more postings relating to the invite mod otherwise I will be playing a part in taking this off topic.

alisoncc

#857
Hi,

just tried to install the Gallery mod. Everything seemed to run smoothly but the menu item for setting it up doesn't appear. There is just a blank space between "Server Settings" and "Current theme", which wasn't there before.

I am using version SMF 1.1.3 and the forum error log shows:

8: Undefined index: smfgallery_admin
.........................Sources/Subs.php
c949d7bebed56e55000492b3f66f5e18

Any clues?

Alison
PS. this is brand new install of SMF with no members or activities as yet.


TrueSatan

Your "blank space" issue suggests that you need to go to ACP>Server Settings and make sure that your forum is set to use English and not English utf8.

If you are using a custom theme (i.e. anything other than the SMF Default theme) then you need to install the mod into it manually.

Try that and see if the error persists.

burrito

Hi there
1.st can you tell me which files need a chmod and which
2nd, when i try to install it i get

Error in Package Installation
At least one error was encountered during a test installation of this package. It is strongly recommended that .....

1.   Execute Modification   smfgallery.xml   Modification parse error
2.   Execute Modification   -   Modification parse error

I have the 1.1.3 version
Can anyone help?

Advertisement: