Previous Thread
Next Thread
Print Thread
Rate Thread
#50816 10/20/2001 8:13 AM
Joined: Feb 2000
Posts: 64
Member
Member
Offline
Joined: Feb 2000
Posts: 64
I looked and did not see some hacks. I assume I either missed them or they are not out for this version yet.

1) Extra UBB codes,like color and center

2) Last perosn to post in a thread. (I do not understand why they have it showing on the main forum page, but not for the individula forums)

3) Image under username (Definable by user in profile, not the avatar hack)

4) Custom username under defined in profile, not one I have to add manually.

The last two should be easy if I knew what file to add the lines to. Should be able to use the picture option in the profile and one of the custom fileds for the names.

Anyhelp would be appreciated. Been to long since i used a 6.x version. Had to go back to the 5.x series and it is just too different.

Just noticed some of these in the datbase. Will the 6.0 versions of the hacks work in 6.1?

[ 10-20-2001: Message edited by: Zedd ]

Sponsored Links
#50817 10/20/2001 8:23 PM
Joined: Feb 2000
Posts: 49
ak Offline
Member
Member
Offline
Joined: Feb 2000
Posts: 49
Quote
quote:
I am looking for same also along with having certain user names in a diff color.
If anyone can point to where these hacks are it will be appreciated.

#50818 10/20/2001 11:30 PM
Joined: May 2001
Posts: 1,042
Likes: 7
Moderator
Moderator
Offline
Joined: May 2001
Posts: 1,042
Likes: 7
1) Hasn't been done yet for 6.1


2) https://www.ubbdev.com/ubb/ultimatebb.php?ubb=get_topic&f=30&t=000023


3) Not sure what your talking about there, an image under your user name is an avatar. Avatar hack here


4) Custom Username? This is already a feature in 6.x. Just go into the Miscellaneous Settings in the control panel and select 'Yes' on Permit Users To Modify Publicly Displayed Names?.

#50819 10/21/2001 2:46 AM
Joined: Jun 2001
Posts: 50
Member
Member
Offline
Joined: Jun 2001
Posts: 50
Quote
quote:
I think he means Custom Status

#50820 10/21/2001 8:29 AM
Joined: Feb 2000
Posts: 49
ak Offline
Member
Member
Offline
Joined: Feb 2000
Posts: 49
Quote
quote:
Is there a final hack to this. I looked at that thread and it was so long with many pages and changes. One is not too sure where to start.
Thanks

Sponsored Links
#50821 10/21/2001 10:01 AM
Joined: Feb 2000
Posts: 64
Member
Member
Offline
Joined: Feb 2000
Posts: 64
Quote
quote:
1) thanks I will look forward to a time when someone does do it.

2) Thanks I will look it up

3) The avatar hack allows you to have images on your server that people can select from a drop down menu. There was a hack for the 5 series that let people in whatever image they wanted in their profile. That is what I would like. (unless ofcourse newer versions of the avatar allow for this.) I also had this in my ubb 6.0 before Iwent back to my 5 eries due to problems with the 6. It should be possible to do. There is already a profile field for an image. It would be a matter of putting it under the users name, limiting the size when displayed, and adding in a 1by1 transparent gif, when they have no image entered. I unfortunately do not have the skill to do it, but I nkow others have in the past. Just something fro the hackers to think about if they have the time.

4) Sorry, yues I meant custom title. I know the UBB has it where I can do it myself, I want it to be a profile filed. Again with the extra custom fileds it shoudl be a mtter of just where in the ubb the new filed should go, but again Ido not know where that info is or in what file.

thanx for the help guys, anything futher would be appreciated.

#50822 10/21/2001 11:19 AM
Joined: Feb 2000
Posts: 64
Member
Member
Offline
Joined: Feb 2000
Posts: 64
ok I found my old files for the custom title. This adds an extra custom title under where it says Admin, ect


turn the custom field one option on.
In the vars_registration.cgi

change
customfield1 => qq~~,

to

customfield1 => qq~Custom Name~,

In the public_topic.pl file

find: (around line 117)

sub topic_row {

if ($alt_color eq "$vars_style{AltColumnColor1}") {
$alt_color = "$vars_style{AltColumnColor2}";
} else {
$alt_color = "$vars_style{AltColumnColor1}";
}

and replace it with:

sub topic_row {

my $custom_txt = $user_profile[16];
chomp($custom_txt);

if ($alt_color eq "$vars_style{AltColumnColor1}") {
$alt_color = "$vars_style{AltColumnColor2}";
} else {
$alt_color = "$vars_style{AltColumnColor1}";
}

lastly find:

$user_status


$member_number

and change it to:

$user_status


$custom_txt


$member_number


I just did this and it works. Let me know what you think.

I did not create the hack, I just found the 6.0 files and research what was changed/ I do not however recall who helped me with this the first time.


I also have something similar for the image under the name using the picture part of the profile. the problem is I get a red x when some one does not have an image entered. I thought I had this fixed with a 1 by 1 transparent gif, but it is ot working. Ican post that is someone wants to take a look at it.

#50823 10/21/2001 3:14 PM
Joined: May 2001
Posts: 1,042
Likes: 7
Moderator
Moderator
Offline
Joined: May 2001
Posts: 1,042
Likes: 7
Oh custom user text? Do what you did for making custom title #1 for this function. Then you need to only add

$user_profile[16]

where you want it. no need to chomp it ><

#50824 10/21/2001 3:21 PM
Joined: Feb 2000
Posts: 64
Member
Member
Offline
Joined: Feb 2000
Posts: 64
ok thanx. that would work too smile
Now if Ican just figure out the user image thingi would be happy. I placed the code Ihad for that in the mods question forum.

#50825 10/21/2001 8:50 PM
Joined: Jun 2001
Posts: 50
Member
Member
Offline
Joined: Jun 2001
Posts: 50
Quote
quote:
It might be a little extra work to get the HTML right, but you can do almost the same thing for using the My Picture field for avatars, just use $user_profile[20] to insert the URL.

If you can get that to work, write up a text file for both of them and post em (with proper credits, of course wink )...I know a lot of people who would like this.

[ 10-21-2001: Message edited by: Outback2K1 ]

Sponsored Links
#50826 10/21/2001 9:27 PM
Joined: Feb 2000
Posts: 49
ak Offline
Member
Member
Offline
Joined: Feb 2000
Posts: 49
Quote
quote:
I tried this one and I could not get it to work. If someone can do it for me I will appreciate it.
Thanks

#50827 10/21/2001 11:06 PM
Joined: Feb 2000
Posts: 64
Member
Member
Offline
Joined: Feb 2000
Posts: 64
I can get the image in the correct spot and limited to the correct size. I just can not fix the broken link for people who did not enter an image.

you can go here to see what I have

https://ubbdev.com/ubbcgi/ultimatebb.cgi?ubb=get_topic;f=29;t=000181

and I do not rememeber who originally wrote these.

[ 10-21-2001: Message edited by: Zedd ]

#50828 10/27/2001 7:23 PM
Joined: Oct 2001
Posts: 29
Junior Member
Junior Member
Offline
Joined: Oct 2001
Posts: 29
Quote
quote:

I did it, just install the AVATAR fix, but do not hack the CP. This allows them to put the path to the image they want and you do not have to worry.

If people do not enter an image, it does nothing.

#50829 10/27/2001 7:57 PM
Joined: Oct 2001
Posts: 33
Junior Member
Junior Member
Offline
Joined: Oct 2001
Posts: 33
Adding custom UBB codes is probably the easiest thing any individual user can do. It does require some knowledge of how PERL regular expressions work, or the ability to reason it out. Here's a quick rundown.

You'll need to edit two files, ubb_lib.cgi and ubb_lib_posting.cgi.

First, open ubb_lib.cgi and find the line "sub UBBCode {". This is the routine that converts a user's message into html using UBBCode rules. Here's a sample from the routine, which converts [ b][ /b] (without spaces) into :
Code
code:
$_[0] refers to the whole message. =~ followed by s/ tells the compiler that it's going to search through the entire message and replace what comes next with whatever comes after that (just hold on, I know it's confusing). This is the search/replace format: s/find this string/replace with this string/extra tags;. Here's the fun part.

Between the first two "/" is what the search algorithm is going to replace. In this case, we're searching for [ b] followed by text and a closing [ /b]. You use parentheses to separate different "pieces" of a search. The first () says to look for [ b]; you always put a in front of brackets, because they usually denote something else in PERL (array indices). After that comes (.+?). In english, this code tells the compiler to match any sequence of characters of any length. This represents the text that you want to bold-ify. Finally comes a (), which searches for the final [ /b]. Again, a / by itself would normally denote the end of the "replace this text" part of the search, so you put a in front of it to tell the compiler to physically search for a /. So all that will find any string surrounded by [ b] [ /b]. Pretty, ain't it?

Next is the "replace with" part, which follows the second /. This one's a little easier. We start the replace-with code with a , since we want the final text to be displayed as bold, and is the HTML way to denote bold. Following that is a $2 -- this is PERL notation for "what was found by the (.+?)" You follow with a to add the final tag.

After the "replace with" code comes extra tags that tell the search how to perform. In most cases you'll add an /isg; to your search. "i" tells the search to Ignore Case; "s" says that spaces and endlines can be used in the match; and I forget what g does. Use it anyways smile .

So that little tag of code is what turns [ b]This text here [ /b] into this text here.

But that's only half the story wink . The UBB still has to know how to turn the HTML from a message back into UBBCode, for when users edit their posts. Open ubb_lib_posting.cgi to see how that's done. Find "sub reverse_ubb_code {". The code is essentially the same, only a little backwards.

Code
code:

In this case, we want to replace TEXT with [ b]TEXT[ /b]. I think you can see how it does it, if you followed my previous example.

SO! How to add your own commands? You'll need to add code to both the UBBCode and reverse_ubb_code functions. I'll give you an example, using [center] to center text. Following is a general template for what to add to make your own custom commands.
Quote
quote:
So, following the template to add [center]:
In ubb_lib.cgi, we add $_[0] =~ s/([center])(.+?)([/center])/
$2
/isg;
In ubb_lib_posting.cgi, we add $_[0] =~ s/(
And that's it. The toughest part is figuring how to represent what you want in HTML. Here are some things I use in my UBB:
Center: as above
Indent:

Right-justify:

Red highlighting:
Small font:

The possibilities are all but endless. Hope this somewhat helps.

[edit: stupid smilies mess up code]

[ 10-27-2001: Message edited by: Influenza ]


(Scientists) are apolitical, supposedly, like civil servants--empiricists, who only wanted things managed in a rational scientific style, the greatest good for the greatest number, which ought to be fairly simple to arrange, if people were not so trapped in emotions, religions, governments, and other mass delusional systems of that sort.
#50830 11/02/2001 2:40 AM
Joined: Oct 2000
Posts: 215
Member
Member
Offline
Joined: Oct 2000
Posts: 215
I just got the old hack and looked at the same code in 6.1 to see how the formatting changed, then modified the old 5.x extra ubb tags to match the new syntax. It was really easy as Infl. said.


Ultimate Frisbee is good for you, it improves your symbolic logic skills.
#50831 04/07/2002 5:52 AM
Joined: Feb 2001
Posts: 33
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 33
quote:
Originally posted by raiyan:
Last perosn to post in a thread. (I do not understand why they have it showing on the main forum page, but not for the individula forums)

2) https://www.ubbdev.com/ubb/ultimatebb.php?ubb=get_topic&f=30&t=000023

This Thread is down...can anyone help me, i'm looking for this hack too

#50832 04/07/2002 3:49 PM
Joined: May 2001
Posts: 794
Content Queen
Content Queen
Offline
Joined: May 2001
Posts: 794
quote:
Originally posted by Zedd:
I looked and did not see some hacks. I assume I either missed them or they are not out for this version yet.

1) Extra UBB codes,like color and center

Zedd,

I see where you started this topic back in October, 2001.

Are you still using 6.1? Or have you upgraded to 6.2+?

If you have, then there are two hacks created that allow you to install extra Instant UBB Code.

One is Advanced UBB Code Buttons -- created by MrStormyNights (this is the hack I use at my community)

The other is UBB Code Button Animated -- created by wwb95


Sue
adwoff.com

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Posts: 70
Joined: January 2007
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)