Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Nov 2000
Posts: 17
wpg
Offline
Member
Member
Offline
Joined: Nov 2000
Posts: 17
Wow! I miss alot of my old hacks frown

Couple quick questions:

1) User images. There's a field for this in user profile, but it seems to only show up when viewing the profile (ie. here: ultimatebb.cgi?ubb=get_profile;u=XXXXXXXX) How can you make it show up beneath the user name on the posts? Templates?

2) I have other mods that dealt with the edit profile, show profile, and build post routines. Where would I find this in v6? I find the number of files overwhelming in this new version. Templates again for this?

Am I correct in assuming the templates are purely cosmetic, allowing quick easy customization without hacking up the actual code that does the work?

3) I had a hack I wrote for 5.47 that allowed the option to return to the post itself (default) or to the forum listing after posting through the use of cookies. Any chance someone has written something like this for v6? smile

Sponsored Links
Joined: Nov 2000
Posts: 17
wpg
Offline
Member
Member
Offline
Joined: Nov 2000
Posts: 17
UBBDev.com » Miscellaneous » New Members Forum » finally upgraded from 5.47 to 6.4

Oh, another question: I had an extra one of these forum trees at the bottom of the thread. Templates again? smile

Joined: Nov 2001
Posts: 1,080
Member
Member
Offline
Joined: Nov 2001
Posts: 1,080
1: If you are referring to the avatars you should be able to enable them via CP (Additional Settings). Qasic's avatar hack also will work (with a few modifications) which will allow Flash avatars and custom URLs. While I used this hack, I dis-allowed members to upload their own avatars as they must submit them to me and if approved I upload it for them. Most UBB users are satisfied with the default avatar settings.

2: The files you need to look into are the public_edit_profile.pl and public_display_profile.pl. Both are in the noncgi/Templates directory. To build post routines I can only think of going into CP and under Maintanence you'll find a rebuild post section...Unless you are referring to something else?

--The majority of the cosmetic work lies in the .pl files although there will be exceptions to the rule where you will need to edit the .cgi files (located in cgi-bin). I can't say that you won't hack into the actual codes since I tend to edit a lot of them.

3: After posting the user will automatically jump to his/her post. You won't need a hack for it...Not that I know of anyway.

Joined: Nov 2001
Posts: 1,080
Member
Member
Offline
Joined: Nov 2001
Posts: 1,080
Quote
quote:
Originally posted by wpg:
UBBDev.com » Miscellaneous » New Members Forum » finally upgraded from 5.47 to 6.4

Oh, another question: I had an extra one of these forum trees at the bottom of the thread. Templates again? smile
I also have the "tree" links at the top and bottom of my topic pages (and forum pages for that matter) for easier browsing. Go to public_topic_page.pl and place this code:

Code
[/code]And place it anywhere after:

[code]
You will need to experiment with the codings as the one I gave you is somewhat generic. While 6.4 is a bit more complex than versions 5 in time as you mess around with the files will you be more comfortable with them and find the flexibility of customizing your board.

smile

Joined: Nov 2000
Posts: 17
wpg
Offline
Member
Member
Offline
Joined: Nov 2000
Posts: 17
Primetime: Thanks! That extra tree was easy!

But 1) still doesn't work for me. I have avatars enabled, but I'm talking about
Quote
quote:
Your Picture:
Enter a link to a picture of yourself. This must be a complete URL.
The image linked from here only shows up when viewing a member's profile... I want it under their name beside every post.

2) Those look like the right places. I had a user image gallery, that allowed members to upload pics. There'd be an image icon that would show in their "tray" beside, profile, edit, quote, home, etc. So I need to find the code that "builds" the display thread, as well as the profile edit and display routines. I think I have that cased though smile

3) Yes, default is to return to the post to view it after you post. I (and alot of my members) find this tedious, so I hacked in the option to return back to forumdisplay.cgi... Took me a bit of work to figure out in 5.47 as it needed cookies...

Thanks for all the help so far. It's a nice feeling playing with code again. smile Whatever happened to ubbhackers?

Sponsored Links
Joined: Nov 2000
Posts: 17
wpg
Offline
Member
Member
Offline
Joined: Nov 2000
Posts: 17
User image was easy... for anyone else that wants it...

in public_topic_page.pl, find
Quote
quote:
my $row = qq~
and just above add
quote:
[qb]if (($vars_registration{picture_field_use} ne 'DEL') && ($user_profile[20] ne '') && ($user_profile[20] ne 'http://')) {

$user_profile[20] = "http://$user_profile[20]" unless $user_profile[20] =~ m/^http:///;
$user_profile[20] = &ImageChecker($user_profile[20]);

if($user_profile[20] =~ m!//[^/]+/!) {
$hackeduserimage = qq~$vars_wordlets{picture_field}~;

} # end real field
} # end field[/qb]
then just a few lines down, after $linkname add
$hackeduserimage

Joined: Nov 2000
Posts: 17
wpg
Offline
Member
Member
Offline
Joined: Nov 2000
Posts: 17
Couple more questions:

1) I had simple scripts that I used to allow site wide consistent style, basicalls as follows:

require ultbb.setup

$headerinsert
$header
some html
$footer

what's the equivalent to this in 6.4?

2) I had other scripts that required a login before doing this...

basically

require ultbb.setup + couple others

authorize username + p/w

then

$headerinsert
$header
html
$footer

I've looked, but can't find where the user authorization takes place in 6.4?

Joined: Jan 2000
Posts: 5,073
Admin Emeritus
Admin Emeritus
Joined: Jan 2000
Posts: 5,073
Look to noncgi/styles/vars_style_*.cgi for your style settings.

Authentication occurs only in the verify_id subroutines in ubb_lib and ubb_lib_2.


UBB.classic: Love it or hate it, it was mine.
Joined: Nov 2000
Posts: 17
wpg
Offline
Member
Member
Offline
Joined: Nov 2000
Posts: 17
Charles: Is there by chance an existing hack out there that would show these two in action.

I know just enough perl to be dangerous... hahah

I'm usually pretty good at taking apart someone else's code and making it do what I need, but I'm having troubles with this. frown

Joined: Nov 2000
Posts: 17
wpg
Offline
Member
Member
Offline
Joined: Nov 2000
Posts: 17
Sorry for all the questions, but here's another smile

that "return to thread or forumdisplay" hack I was talking about... it's still here from a couple years back:

https://ubbdev.com/ubb/ultimatebb.php?ubb=get_topic;f=7;t=000387

I'd like to be able to do the same thing in v6, but I'm still overwhelmed by all the new code

Sponsored Links
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
Admin Emeritus
Joined: Jan 2000
Posts: 5,073
Ah, but being dangerous is fun.

The best source to figure out how the styles work and how authentication works is ultimatebb.cgi itself.

The styles are pretty straightforward... pretty much everything from the old Styles.file is there, as well as the header/footer from UltBB.setup. The trick is that they're in a hash... Ted didn't use hashes much back in the 5 series - are you familiar with their use?

Inside the code, the vars_style files are never really touched manually - that's all delegated to the LoadStyleTemplate subroutine. Check out part of ultimatebb.cgi, around line 130, starting with "if(defined $templatefile) {"

verify_id is also straightforward.. pass it a username and password, and it will return the PDN, daysprune, user number, modq flag, PNTF pref, and avatar prefs for the user. You can then use the user number to open up the profile. Check out the code in the do_login block in ultimatebb.cgi, around line 340.

Do beware the verify_id will throw StandardHTML if the user authentication fails. If you need to just auth the user, then you'll need to do so manually.

Now, actually using these subs can be a real pain... you can't just include the library and call the functions, as there are certain globals that need to be present.

Off the top of my head, you'll need, in order:

vars_config, vars_display, vars_misc, vars_wordlets, vars_wordlets_err, ubb_lin, ubb_lib_filehandler, ubb_lib_filehandle, ubb_lib_files, ubb_lib_time....

Don't forget to initialize the filehandler! You'll probably also need to load public_common, or at least provide the subs it contains...

Check out the code around line 80 of ultimatebb.cgi to see how all this is done...

Overwhelmed yet? smile

Getting that redirect trick done might be a real pain... all the transitions are handled by sub Transition in public_common, but it can only take one URL as an argument. Hijacking it to be able to take additional URLs would probably be the best route.


UBB.classic: Love it or hate it, it was mine.
Joined: Nov 2001
Posts: 1,080
Member
Member
Offline
Joined: Nov 2001
Posts: 1,080
Quote
quote:
Originally posted by Charles Capps:
Ah, but being dangerous is fun.
I've always pictured you as a conservative guy. eek


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
Nettomo
Nettomo
Germany, Bremen
Posts: 417
Joined: November 2001
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
WebGuy 2
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 20240430)