News:

SMF 2.1.6 has been released! Take it for a spin! Read more.

Main Menu

Invite (registration through invitation)

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

Previous topic - Next topic

Sarke

New version out, some significant additions.

1.12 (Mar 13, 2007)
- Changed how the mod works when "invitation only" isn't set; instead of invite keys, an inviter can use the same link several times.
- Added permission to grant membergroups unlimited credits.
- Fixed the top_inviter() function for block code so it sorts the inviters properly.

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

Lord Anubis

#161
Quote from: Sarke on March 13, 2007, 07:49:26 PM
New version out, some significant additions.

1.12 (Mar 13, 2007)
- Changed how the mod works when "invitation only" isn't set; instead of invite keys, an inviter can use the same link several times.
- Added permission to grant membergroups unlimited credits.
- Fixed the top_inviter() function for block code so it sorts the inviters properly.

SWEET!  Sarke you are the best! You included the karma mod so no changes were needed!!!  Not just that you are on top of everything!!!  Cant wait for your NEXT mod...

Thanks for the new additions they were exactly what I wanted  ;)

choloman05

 Hey guys, I was editing out the code for this mod yesterday and I accidentally went a little too far. Does anyone know where that original bit of code goes? Thanks a lot.  :D  (I posted this whole big chunk for reference.)



</add>
  </operation>
  </file>
- <file name="$themedir/Stats.template.php" error="fatal">
- <operation error="fatal">
- <search position="replace" regexp="false" whitespace="exact">
- <![CDATA[ </tr><tr>
<td class="catbg" colspan="4"><b>', $txt['smf_stats_5'], '</b></td>

  ]]>
  </search>
- <add>
- <![CDATA[ </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>

  ]]>

Sarke


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

RoarinRow

Whoa I tried to use 1.12 and something didn't work out right.

It installed without any failed test, however, when I went to Features and Settings, the page would not load.

I had to go back to Packages and uninstall the new package.  I clicked on Features and Settings and I was able to see the page again, however, the 'Invite' tab was still there.

I went to my FTP program, and modified Modsettings.php and deleted the entries for the Invite Mod and re-upload.  Although I uninstalled the package and there was no notifications of any failed tests, the uninstall did not clean up that file.

Also, when I checked on my Profile, the Profiletemplate.php was messed up somehow.  I used a backup to restore that file.

Just a heads up Sarke.

SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

Sarke

Not sure why that would have happened, it's worked fine all the times I've uninstalled and reinstalled the different versions.  When many mods are installed on top of each other sometimes it can give unexpected results.  I would suggests cleaning out the code and then installing 1.12 fresh.

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

choloman05

I need to put this back into my Stats.php (I accidentally erased it)

</tr><tr>
<td class="catbg" colspan="4"><b>', $txt['smf_stats_5'], '</b></td>


But I don't know where it goes.  

Sarke

Just look at the default stats.template.php

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

choloman05

oh yeah. duh. Thanks.       And btw, RoarinRow, I think that's the same problem I had.   

Sarke

Intersting.  It sounds like both of you had a problem where it only removed the files added and didn't reverse the install properly.  Again not sure why it would do that, but I think it goes beyond my mod.   

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

choloman05

#170
Who knows. It probably does have to do w/mods messing each other up. 

nevermind, I'm retarded.

Sarke

Hehe, ok you wait here, I'll sort it out... :P

Starting on line 174 of the default Stats.template.php from SMF 1.1.2:


echo '
</table>
</td>
</tr><tr>
<td class="catbg" colspan="4"><b>', $txt['smf_stats_5'], '</b></td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center"><img src="', $settings['images_url'], '/stats_history.gif" width="20" height="20" alt="" /></td>
<td class="windowbg2" colspan="4">';

if (!empty($context['monthly']))
{

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

RoarinRow

Quote from: choloman05 on March 14, 2007, 02:26:48 PM
oh yeah. duh. Thanks.       And btw, RoarinRow, I think that's the same problem I had.   

I also had to reverse the code from Stats.template.php and Stat.php   :o

SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

choloman05

Wait, you mean you had to switch the codes from Stats.template and Stats.php ? 

Cause, I'm having a problem right now. Everything should be fine. But when trying to apply v1.12 now, I keep getting an error in Stats.template.php.   

Sarke

If you'll send me your stats.template.php I'll have a look at it.

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

choloman05

Thanks a lot Sarke. It's comin.   

btw- I have to say your support for your mod is top notch. Nice job.  

choloman05


Sarke

You have spaces in some places where the default has tabs.  Other than the whitespace yours is identical to the defult though, so I would suggest just uploading the deafult one.

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

RoarinRow

Quote from: choloman05 on March 14, 2007, 03:22:18 PM
Wait, you mean you had to switch the codes from Stats.template and Stats.php ? 

Cause, I'm having a problem right now. Everything should be fine. But when trying to apply v1.12 now, I keep getting an error in Stats.template.php.   

Just finished going through the install package and deleting the mod that supposed cleared the uninstall tests.  I'll wait awhile before installing again.  Gotta do some clean up on my test site first.

SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

choloman05

Well I couldn't connect to smf for the past 5 minutes. ...

And, it worked, kinda.    Unfortunately, I've got the double "invite"s in the menubar and the same problem with "Features and Options" as before.  ????

Advertisement: