News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Invite (registration through invitation)

Started by Sarke, March 03, 2007, 02:47:51 PM

Previous topic - Next topic

Sarke

#80
You have a few other mods installed that conflict with this one.  Install the mod anyways (even though it says there's an error), and then open your index.template.php and find


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


replace it with


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



then find


// If the user is a guest, show [login] button.


replace it with


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

// If the user is a guest, show [login] button.

My MODs          Please don't PM me for support, post in the appropriate topic.

srikk

#81
Thank you very much amigo. Yes it is working now. Great!  :D

:( Sorry, I didn't observe initially. Now I am getting two "Invite" buttons.

Sarke


My MODs          Please don't PM me for support, post in the appropriate topic.

srikk

 :( Sorry, I didn't observe initially. I am getting two "Invite" buttons.

Sarke

Open up index.template.php again and remove one of these (you have an extra one by mistake):


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

My MODs          Please don't PM me for support, post in the appropriate topic.


Stirred

#86
I did furtherlooking into the differences.

And now from the profile I can´t go to the invitees list of that person. But that is on purpose, right? But i can´t see too who invited who in the memberlist and that happens on default/custom.

The invite page only shows the invite keys.

I attach my files with 1.09 for you to check, but from what i see, the only problem for the changes you made is not showing up in the memberlist.

And in my opinion the invite page of one person should show the invitees, is good to keep track of whom we invited.
- eighteen seconds before sunrise -

Sarke

#87
If you have any invitees then there should be a number next to "Members Invited: " in the profile.  Clicking that number will take you to the list, and currently that is the only way to get to the list.

EDIT: it looks to be installed correctly.

My MODs          Please don't PM me for support, post in the appropriate topic.

exodia

hi
i got a problem with the button, am using the satlite theme by Inbetwee. After adding the button am getting a blue box around it.this is my code
global $modSettings;
echo ($current_action == 'invite' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td align="center" valign="top"><img src="' . $settings['images_url'] . '/menu_devider.gif" width="31" height="28" alt="" /></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>' : '';

if you want to see, please check
http://www.ezhostlive.com/forums
ur: ezdemo
ps: ezdemo

Sarke

Many themes use different code for the menu buttons (this wouldn't be a problem if SMF had a loop instead of each menu item on it's own, but anyways...).  Here's an very general manual install of the menu button for most themes that will use the themes' own code.


1. Open index.template.php

2. Put 'invite' in the $context['current_action'] array.


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



3. Make a copy of the menu button code and insert it right after.  The code block usually starts with

// the [member] list button

You should now have two "Members" buttons in the menu, right next to each other.


4. In the second block of code (the copy you just made), replace


// the [member] list button
if ($context['allow_memberlist'])


with


// Invite MOD.
if (allowedTo('invite'))
{
global $modSettings;


and add a closing curly bracket "}" after the code block.


5. In the same block of code, replace all occurances of

mlist

with

invite

Make sure you don't replace it in the entire document, but just this block of code.


6. In the same block of code, replace

$txt[331]

with

(!empty($modSettings['invite_menu_title']) ? $modSettings['invite_menu_title'] : $txt['invite_title'])


7. Save and you're done!

My MODs          Please don't PM me for support, post in the appropriate topic.

Stirred

Well just installed and checked it again I see now the changes and it's working well. =)
- eighteen seconds before sunrise -

Sarke

Good to know.  I'll make this a bit more obvious in the next release so the list of invitees is easier to find.

My MODs          Please don't PM me for support, post in the appropriate topic.

MinasC

Quote from: MinasC on March 08, 2007, 01:04:27 PM
Quote from: Sarke on March 07, 2007, 03:03:40 PM
Uninstall the mods that also modifies ManagePermissions.php that you installed after Invite 1.03, then 1.03 should uninstall correctly.



Another option would be to uninstall 1.03 manually (this one is probably less work if there are many mods involved).  Uninstall it even though it gives you errors, and then remove the code manually from those files that gave errors.

If ManagePermissions.php and Modifications.english.php are the only ones that failed, here's how you do it.

In ManagePermissions.php, remove the following rows:


'invitees_any',



'invite',
'invitees_own',



'invite' => array(
'invite' => false,
'invitees' => true,
),



'invite',



In Modifications.english.php, remove the following rows and all rows in between:


// Invite MOD.
$txt['invite_title'] = 'Invite';


to


$txt['registration_invite_expired'] = 'Sorry, the invite key has expired.';


did it but couldn't find
'invitees_any',
and
'invite' => array(
'invite' => false,
'invitees' => true,
),

and
'invite',
in ManagePermissions.php (everything ok with Modifications.english.php though) !!! so i uninstalled 1.03 and deleted the files !!!

nevertheless when i tried to install 1.09 it returned an error : test failed in index.template.php !!!

any ideas ? plz help , there are many members asking me to invite people and i don't know what to do !!!

sarke you forgot to answer to me , plz help !!! i'm sending you my index.template.php via pm !!!

i'm using smf 1.1.2 default theme/tp 0.971

MinasC

well i just realised i can't attach to pms so here it is !!!

RoarinRow

FYI Sarke, yesterday when I uninstalled 1.09 and reinstalled 1.08 I noticed that both modifications.english.php codes were there.  I tested it on two different forums.

SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

Sarke

Quote from: MinasC on March 09, 2007, 12:54:11 PM
well i just realised i can't attach to pms so here it is !!!

I need your ManagePermissions.php


Quote from: RoarinRow on March 09, 2007, 01:19:53 PM
FYI Sarke, yesterday when I uninstalled 1.09 and reinstalled 1.08 I noticed that both modifications.english.php codes were there.  I tested it on two different forums.

You mean that the code from both 1.08 and 1.09 was there?  Did it give you an error when you uninstalled 1.09?

FYI, Stirred confirmed that 1.09 is working like expect.

Quote from: Sarke on March 09, 2007, 11:19:48 AM
If you have any invitees then there should be a number next to "Members Invited: " in the profile.  Clicking that number will take you to the list, and currently that is the only way to get to the list.

My MODs          Please don't PM me for support, post in the appropriate topic.

MinasC


Sarke

Do you always yell? :P

Looks like you've uninstalled 1.03 successfully.  Install 1.09 even though it gives you the error in index.template.php and then follow these instructions:

http://www.simplemachines.org/community/index.php?topic=154999.msg998334#msg998334

My MODs          Please don't PM me for support, post in the appropriate topic.

RoarinRow

Quote from: Sarke on March 09, 2007, 01:23:29 PM
Quote from: MinasC on March 09, 2007, 12:54:11 PM
well i just realised i can't attach to pms so here it is !!!

I need your ManagePermissions.php


Quote from: RoarinRow on March 09, 2007, 01:19:53 PM
FYI Sarke, yesterday when I uninstalled 1.09 and reinstalled 1.08 I noticed that both modifications.english.php codes were there.  I tested it on two different forums.

You mean that the code from both 1.08 and 1.09 was there?  Did it give you an error when you uninstalled 1.09?

FYI, Stirred confirmed that 1.09 is working like expect.

Quote from: Sarke on March 09, 2007, 11:19:48 AM
If you have any invitees then there should be a number next to "Members Invited: " in the profile.  Clicking that number will take you to the list, and currently that is the only way to get to the list.

yes both codes were there and it did not give an error message when i uninstalled 1.09 or reinstalled 1.08.

SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

MinasC

Quote from: Sarke on March 09, 2007, 01:36:52 PM
Do you always yell? :P

Looks like you've uninstalled 1.03 successfully.  Install 1.09 even though it gives you the error in index.template.php and then follow these instructions:

http://www.simplemachines.org/community/index.php?topic=154999.msg998334#msg998334

did installed 1.09 successfully , but before i do the changes you describe in that link , may i ask what they are for ??? i have the "invite" button showing in the menu and the "invite" submenu in admin>features and options , but i cannot see who invited who , and when i send an invite mail it doesn't get to the recipient !!! what should i do ?

Advertisement: