Welcome, Guest. Please Login or Register.
May 05, 2024, 04:24:52 AM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  User profile: hide/show avatars+sigs « previous next »
Pages: [1] Reply Ignore Print
Author Topic: User profile: hide/show avatars+sigs  (Read 11967 times)
eloj
Noobie
*
Posts: 9


I'm a llama!

WWW
User profile: hide/show avatars+sigs
« on: December 03, 2003, 06:37:45 PM »
Reply with quote

(Edit: I've updated and bugfixed the patch to also include an option for signatures)

I've developed a patch for 1.5.4 that adds an admin + user option of not showing avatars and/or signatures.

The admin settings are expanded with "$allow_hide_avatars" and "$allow_hide_sigs" which in turn enables an option in the user profiles which when set.

I think this is a very worthwhile feature. How would I go about contributing it?

The only thing missing is to add these new strings to the language files:


$txt['prof_hide_avat1'] = 'Hide people\'s avatars?';
$txt['prof_hide_avat3'] = 'Allow users to disable avatars?';
$txt['prof_hide_sigs1'] = 'Hide people\'s signatures?';
$txt['prof_hide_sigs3'] = 'Allow users to disable signatures?';


I didn't bother with force-disabling the users own avatar if he enables avatar-hiding, but that's a trivial change which I'll make if so desired.
« Last Edit: December 04, 2003, 03:37:35 AM by eloj » Logged
eloj
Noobie
*
Posts: 9


I'm a llama!

WWW
Re:User setting for avatars
« Reply #1 on: December 03, 2003, 08:19:06 PM »
Reply with quote

I must say, it's really confusing where you're supposed to go with actual source code patches.

Anyway, the patch is now available here (edit: updated to include sigs, see above)

The only thing missing is the translation(s) and a patch to the future install.php so that upgrades adds "hideAvatars tinyint(4) default NULL" to the "yabbse_members" table, which can be done by, if you want to take the patch for a spin, running:

ALTER TABLE `yabbse_members` ADD `hideAvatars` TINYINT(4) DEFAULT NULL AFTER `hideEmail`;
ALTER TABLE `yabbse_members` ADD `hideSigs` TINYINT(4) DEFAULT NULL AFTER `hideAvatars`;

Since I have no idea if you think this is crap or not, I'm not going to bother with install.php (yet).

Please let me know how I can increase the odds of this 'going in'.
« Last Edit: December 04, 2003, 02:10:16 AM by eloj » Logged
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:User setting for avatars
« Reply #2 on: December 03, 2003, 09:42:41 PM »
Reply with quote

this is a good idea... I think there's a mod written for it already even

there's a board here for those who need help writting a mod... it's not very hard really ;)

if you want to contribute it as code, post it in the Completed Mods board and start the thread subject with "CODE" and the YaBB SE version number and then the name of the mod

hope this helps :)
Logged

My Mods: Avatar & Sig Size Control, No Show Msg Subject, Msg URL Composer, Built-in Avatar Rand, Built-in Sig Rand, Remove New-lines Excess, Show All Stars, Search Bar, Smart URLs
eloj
Noobie
*
Posts: 9


I'm a llama!

WWW
Re:User setting for avatars
« Reply #3 on: December 03, 2003, 09:49:43 PM »
Reply with quote

I had no idea what "mod" meant in YaBB SE-speak, but from a quick browse of the "How to write a mod"-post it looks like a complicated way of packaging and implementing patches.
« Last Edit: December 03, 2003, 11:22:53 PM by eloj » Logged
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:User setting for avatars
« Reply #4 on: December 03, 2003, 11:03:03 PM »
Reply with quote

could be, but not really

just tell what file you'll modify, then what code block to search for and then the new code to replace, add after or before that

I don't know how to use patches  :P
Logged

My Mods: Avatar & Sig Size Control, No Show Msg Subject, Msg URL Composer, Built-in Avatar Rand, Built-in Sig Rand, Remove New-lines Excess, Show All Stars, Search Bar, Smart URLs
eloj
Noobie
*
Posts: 9


I'm a llama!

WWW
Re:User setting for avatars
« Reply #5 on: December 03, 2003, 11:20:46 PM »
Reply with quote

That's what a patch is. You create a patch by running the program 'diff' on the original and the modified file or directory. The output is called a "patch" or "diff", which can then be applied to an installation using the program 'patch' to make the necessary changes.

To apply my patch above to an installation, you'd download the diff and put it in the directory where you've got the yabbse installation, and then run:

patch -p1 <yabbse-1.5.4-avatars-be-gone.diff

'patch' and 'diff' are standard UNIX tools, but are of course available for Win32 and other platforms too.
Logged
woodysfj40
Noobie
*
Posts: 12


I'm a llama!

Re:User profile: hide/show avatars+sigs
« Reply #6 on: December 12, 2003, 01:18:48 PM »
Reply with quote

First note, I'm an idiot with regards to php and understanding this stuff, so bear with me...

however, this mod interests me, so I experimented with it this morning...the english.lng, Admin.php, Display.php, and yse153.sql files seem to have no problems....however, the Load.php and Profile.php files are not working for me.  I believe the issue lies in the Profile file...specifically the final portion of that edit...

my existing code is as follows:

"timeFormat='$member[usertimeformat]', timeOffset='$timeOffest', secretQuestion='$member[secretQuestion]', secretAnswer='$member[secretAnswer]', bio='$member[userbio]', hideEmail=$hideEmail, usercolor='$member[usercolor]', disableCensoring=$disableCensoring{$karmaStr}{$bookMarkOption}{$chatOption}{$shoutOption}

and I changed that portion to:

"timeFormat='$member[usertimeformat]', timeOffset='$timeOffest', secretQuestion='$member[secretQuestion]', secretAnswer='$member[secretAnswer]', hideEmail=$hideEmail, hideSigs=$hideSigs, hideAvatars=$hideAvatars$karmaStr, bio='$member[userbio]', hideEmail=$hideEmail, usercolor='$member[usercolor]', disableCensoring=$disableCensoring{$karmaStr}{$bookMarkOption}{$chatOption}{$shoutOption}

I'm guessing the error falls in the $karmaStr positioning (twice)...

any assistance?  Or has anyone done this in a "mod" format yet?

Thanks - this is a great mod!!
Logged
eloj
Noobie
*
Posts: 9


I'm a llama!

WWW
Re:User profile: hide/show avatars+sigs
« Reply #7 on: December 15, 2003, 09:58:21 PM »
Reply with quote

DisableCensoring et.al doesn't exist in the original source code.

Unless you know PHP I suggest you patch a clean source and then reapply any "mods".

Since I found out that yabbse isn't actally a GPL project any more (though I must say that I'm suspicious about how it went non-GPL) I have no real interest in helping with its development.
« Last Edit: December 15, 2003, 09:58:49 PM by eloj » Logged
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:User profile: hide/show avatars+sigs
« Reply #8 on: December 15, 2003, 11:02:25 PM »
Reply with quote

Quote from: eloj on December 15, 2003, 09:58:21 PM
(though I must say that I'm suspicious about how it went non-GPL)

Basically, some people tried to steal the code and recopyright it, which is highly illegal no matter what license you are using, and then thought the GPL allowed them to do this.  After some grief and actually having to talk to a lawyer, a new license was drawn up, with the approval of people from the YaBB SE Team, YaBB Team, and Zef Hemel himself - and it was changed.

If you feel that the new license is not "open" enough, say something about it - it really doesn't make many more restrictions.

Or, if you just want "everything to be GPL" I'm curious as to why you even use PHP, which has OPENLY stated that "GPL is not for everyone." (and they do not use GPL, in case you are wondering.)

-[Unknown]
Logged
eloj
Noobie
*
Posts: 9


I'm a llama!

WWW
Re:User profile: hide/show avatars+sigs
« Reply #9 on: December 16, 2003, 01:19:59 AM »
Reply with quote

There can't have been a lot of outside contributions then since relicensing would require permission from all the people who had worked on the GPL'ed codebase (unless of course, some of their work was trivial to remove).

I found the current license confusing and, as you say, it doesn't make it any harder for someone to steal it if they really wanted to, so I don't see the point in creating a new one. If you'd stuck with the GPL and transfered the copyrights to the Free Software Foundation, like the urge you to, then they'd help enforcing it -- for free. They've done a good job so far. All in all I just prefer to work with licenses that I understand and that allow for forking.

As for PHP, I don't use it myself anymore. This was the first time I wrote PHP code since 1999. I wrote this patch because it'd help improve a board that I frequent (Machinae Supremacy). My only hope was for it to be incorporated into the "main" codebase so that the admin would get it for "free" in a future upgrade. However, that seems very unlikely -- development here seems very closed, not open. I cannot see any devs discussing the core code or future directions, but I can claim to have looked too hard either --  so it seems I've wasted a couple of hours of my life. An email from woody brought me back to answer his question.

Easy come, easy go.
Logged
woodysfj40
Noobie
*
Posts: 12


I'm a llama!

Re:User profile: hide/show avatars+sigs
« Reply #10 on: December 22, 2003, 01:33:40 AM »
Reply with quote

tried a clean/fresh install, performed the "diff" changes, and no dice.

I think this is an awesome mod, and my forum gang is really interested in it....anyone?!?!
Logged
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  User profile: hide/show avatars+sigs « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.024 seconds with 19 queries.