Page Index Toggle Pages: [1] 2  Send TopicPrint
Hot Topic (More than 10 Replies) Frequently Requested Fixes (Read 16557 times)
Carsten
God Member
*****
Offline


...to much YaMS

Posts: 3281
Location: Langå
Joined: Aug 2nd, 2002
Gender: Male
Frequently Requested Fixes
Apr 20th, 2003 at 4:14am
Print Post  
I get a lot of IM's with questions about minor fixes - so as a reference i'll put them here.

How do i disabel member option to delete their account?

In Profile.pl find:
Code
Select All
    <input type=submit name=moda value="$txt{'89'}" onClick="return confirm('$confdel_text')"><BR><BR> 


and replace it with:
Code
Select All
    ~;
    if($settings[7] eq "Administrator") {
    $yymain .= qq~<input type=submit name=moda value="$txt{'89'}" onClick="return confirm('$confdel_text')">~;
    }
    $yymain .= qq~<BR><BR>
 


then still in Profile.pl find:
Code
Select All
      if($member{'username'} ne "admin") { 


and add before:
Code
Select All
      &fatal_error("$txt{'1'}") if($settings[7] ne "Administrator"); 



How do i change the number of replies a topic should have to be "Hot" or "Very hot"?

In Display.pl find:
Code
Select All
      elsif( $mreplies > 24 ) { $threadclass = 'veryhotthread'; }
      elsif( $mreplies > 14 ) { $threadclass = 'hotthread'; }
 


and change the numbers 24 and 14
then in english.lng find:
Code
Select All
$txt{'454'} = "Hot Topic (More than 15 Replies)";
$txt{'455'} = "Very Hot Topic (More than 25 Replies)";
 


and change the numbers 15 and 25 accordingly.

How can i disable members option to change their displayed name?

In Profile.pl find:
Code
Select All
      <td width="320"><font size=2><b>$txt{'68'}: </b></font><BR>
      <font size="1">$txt{'518'}</font></td>
      <td><input type="text" maxlength="30" name="name" size="30" value="$memsettings[1]"></font></td>
 



and replace it with:
Code
Select All
~;
if($settings[7] eq 'Administrator') {
$yymain .= qq~
      <td width="320"><font size=2><b>$txt{'68'}: </b></font><BR>
      <font size="1">$txt{'518'}</font></td>
      <td><input type="text" maxlength="30" name="name" size="30" value="$memsettings[1]"></font></td>
~;
}
else {
$yymain .= qq~
      <td colspan="2"><input type="hidden" name="name" value="$memsettings[1]"></td>
~;
}
$yymain .= qq~
 

« Last Edit: Jan 5th, 2004 at 6:02pm by Carsten »  

If you knock your head against a brick wall and hear a hollow sound, it's not necessarily coming from the wall.
Back to top
 
IP Logged
 
masterstanf2k
Ex Member


Re: Frequently Requested Fixes
Reply #1 - Apr 21st, 2003 at 12:29pm
Print Post  
That's awesome. But I'd like to know if there's a way to disallow members from changing their display name, through the 'Forum Preferences and Settings.' Can you make it so that if a checkbox is selected, then this feature will be disabled??? PLZ
  
Back to top
 
IP Logged
 
Carsten
God Member
*****
Offline


...to much YaMS

Posts: 3281
Location: Langå
Joined: Aug 2nd, 2002
Gender: Male
Re: Frequently Requested Fixes
Reply #2 - Apr 21st, 2003 at 8:08pm
Print Post  
If you read the first post it says "minor fixes". This means small fixes that ppl. can do on a "here and now" basis involving very few changes. What you want is a mod that will have to modify english.lng, AdminEdit.pl and Profile.pl
  

If you knock your head against a brick wall and hear a hollow sound, it's not necessarily coming from the wall.
Back to top
 
IP Logged
 
Christer Alexander
God Member
*****
Offline


Make my day...

Posts: 3443
Location: Lethbridge
Joined: Feb 10th, 2002
Gender: Male
Re: Frequently Requested Fixes
Reply #3 - Jun 21st, 2003 at 10:48am
Print Post  
I tend to follow this principle: If I install that mod, it's because I want that feature. Why turn it off/on? I installed it because I wanted the feature. Smiley
  

Code
Select All
unless(0) { stab("LoonyPandora"); next; } 

Back to top
IP Logged
 
Carsten
God Member
*****
Offline


...to much YaMS

Posts: 3281
Location: Langå
Joined: Aug 2nd, 2002
Gender: Male
Re: Frequently Requested Fixes
Reply #4 - Sep 24th, 2003 at 11:26pm
Print Post  
Often asked how to disable/limit images in signature. This will replace the images with a small icon, linking to the image:

In Load.pl find:
Code
Select All
      $userprofile{$user}->[5] =~ s~\&\&~<br>~g;
 


and add before:
Code
Select All
      $char_160 = chr(160);
      $userprofile{$user}->[5] =~ s~\[img\][\s*\t*\n*(&nbsp;)*($char_160)*]*(http\:\/\/)*(.+?)[\s*\t*\n*(&nbsp;)*($char_160)*]*\[/img\]~\[url=http\:\/\/$2\]\[img\]$imagesdir/profile.gif\[\/img\]\[\/url\]~isg;
 



Edited:
Mind - the second instance of the $char_160 var. in the above code has a blank space that should not be there - i just can't fix that in here  Undecided
« Last Edit: May 2nd, 2004 at 7:31pm by Carsten »  

If you knock your head against a brick wall and hear a hollow sound, it's not necessarily coming from the wall.
Back to top
 
IP Logged
 
mx5gr
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 55
Joined: Jan 22nd, 2003
Re: Frequently Requested Fixes
Reply #5 - Sep 27th, 2003 at 6:24pm
Print Post  
Great hack Carsten, it surely helped our case. However, a mod that would limit the size of the images in the signature would be much desired. Our forum members tend to attach gigantic images, causing the topic pages to download very slowly.
  
Back to top
 
IP Logged
 
Carsten
God Member
*****
Offline


...to much YaMS

Posts: 3281
Location: Langå
Joined: Aug 2nd, 2002
Gender: Male
Re: Frequently Requested Fixes
Reply #6 - Sep 28th, 2003 at 2:52pm
Print Post  
@mx5gr - as you mention yourself, this is only a small hack (the point of this thread)  Smiley
Did you have a look at BHRA's Smart Resize Mod: http://boardmod.yabbforum.com/yabb/YaBB.pl?board=new_mods_beta;action=display;nu...  - mind, the latest beta is attached somewhere around post #130
  

If you knock your head against a brick wall and hear a hollow sound, it's not necessarily coming from the wall.
Back to top
 
IP Logged
 
mx5gr
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 55
Joined: Jan 22nd, 2003
Re: Frequently Requested Fixes
Reply #7 - Sep 29th, 2003 at 9:38am
Print Post  
Thanx Carsten, I installed it and it works fine!
  
Back to top
 
IP Logged
 
Ikari-Kun
God Member
*****
Offline



Posts: 501
Joined: Apr 25th, 2002
Gender: Male
Re: Frequently Requested Fixes
Reply #8 - Nov 29th, 2003 at 2:35am
Print Post  
Maybe someone is annoyed of the "Moderators: N/A" thingy on the Board index. With this hack you could make YaBB so that it doesn't displays this line at all if no moderator is setted

Code
Select All
<edit file>
Sources\Boardindex.pl
</edit file>

<search for>
                  if($showmods eq "") { $showmods = qq~$txt{'298'}: $txt{'470'}~; }
</search for>

<replace>
                  if($showmods eq "") { $showmods = qq~~; }
</replace> 




btw. I were forced by my girlfriend to make this >_>
« Last Edit: Dec 3rd, 2003 at 10:53pm by Christer Alexander »  

perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'
Back to top
ICQ  
IP Logged
 
Carsten
God Member
*****
Offline


...to much YaMS

Posts: 3281
Location: Langå
Joined: Aug 2nd, 2002
Gender: Male
Re: Frequently Requested Fixes
Reply #9 - Dec 3rd, 2003 at 7:21pm
Print Post  
hey Iki, if you would make your girlfriend really happy, why not make a clean cut, and just remove that line totally  Grin
  

If you knock your head against a brick wall and hear a hollow sound, it's not necessarily coming from the wall.
Back to top
 
IP Logged
 
Christer Alexander
God Member
*****
Offline


Make my day...

Posts: 3443
Location: Lethbridge
Joined: Feb 10th, 2002
Gender: Male
Re: Frequently Requested Fixes
Reply #10 - Dec 3rd, 2003 at 10:54pm
Print Post  
Nah, I think she's read it already. To quote the famous Norwegian movie The Julekalender:

"Let's give him some bank!" (And no, I'm not talking about the big house with money in)
  

Code
Select All
unless(0) { stab("LoonyPandora"); next; } 

Back to top
IP Logged
 
Carsten
God Member
*****
Offline


...to much YaMS

Posts: 3281
Location: Langå
Joined: Aug 2nd, 2002
Gender: Male
Re: Frequently Requested Fixes
Reply #11 - Dec 4th, 2003 at 12:07am
Print Post  
Jes - becourse his the one with the biggest tænder and the grimmest tøj...
  

If you knock your head against a brick wall and hear a hollow sound, it's not necessarily coming from the wall.
Back to top
 
IP Logged
 
Christer Alexander
God Member
*****
Offline


Make my day...

Posts: 3443
Location: Lethbridge
Joined: Feb 10th, 2002
Gender: Male
Re: Frequently Requested Fixes
Reply #12 - Dec 4th, 2003 at 7:18am
Print Post  
You get it in Denmark too? And here I was thinking Denmark was this really uncivilized country... Grin
  

Code
Select All
unless(0) { stab("LoonyPandora"); next; } 

Back to top
IP Logged
 
Kelly Kamm
New Member
*
Offline


I love YaBB 1G - SP1.2!

Posts: 14
Joined: Apr 9th, 2004
Re: Frequently Requested Fixes
Reply #13 - Apr 14th, 2004 at 12:24am
Print Post  
I was looking for a way to change / add / remove things from my profile page, such as age / sex / location, etc...

I have specific things I need to get from users on my site, and the current profile page doesn't cut it. Is it a small and simple thing to remove and add profile info fields?

  
Back to top
 
IP Logged
 
CDTrips
New Member
*
Offline


I love YaBB 1G - SP1.2!

Posts: 31
Joined: Mar 14th, 2004
Gender: Male
Re: Frequently Requested Fixes
Reply #14 - Apr 14th, 2004 at 12:48am
Print Post  
They have a real good tutorial on how to do that here...

Profile Edit
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint