UBB.Dev
Posted By: ADWOFF Borrowing from UBBDev - 02/28/2003 4:49 AM
I have three things that I'd love to be able to change regarding templates at my site.

The first is to be able to remove the moderator column and replace it with putting the moderators in the text area that describes each forum -- like shown here in this snapshot of UBBDev's front page:

[Linked Image]


I'd also love to be able to consolidate things at the top of my forums, etc., like you do here at UBBDev ... as shown in this shot:

[Linked Image]

The final thing I'd like to be able to do is with the new directory; I'd like to be able to remove all references to "top posters" as shown here:

[Linked Image]

One other thing that I'd love to be able to do with the directory is put the "content islands" that I create there. How difficult (impossible?!) might that be?

As always, thanks!
Posted By: PrimeTime Re: Borrowing from UBBDev - 02/28/2003 6:29 AM
#1:
If you want to do it the easy way then go into CP then General Settings and where it says "Moderator Column Display?" select no. That will eliminate your Mod cell.

Now open public_forum_summary.pl and look for this code:

Code
[/code]add after:

Code
</pre></div></div>That should get your Moderators to display.<br><br>---------------------<br><br>#2:<br>I've never used the Compact Header Hack but I think that's what it does...Positions your "$show_logout" and "$MainButtonsLine" into one location.  I need someone to verify if that is what the Compact Header does.<br><br>The second part:  If you want to do it manually for only the public_forum_page.pl then these two codes:<br><br>$vars_wordlets{moderated_by} $Moderator<br><br>$more_topics_wording<br><br>are the ones that you need to target and create the table for it.  I do not know how your tables are set up but I made a quick code in case you wish to try:<br><br>In public_forum_page.pl find:<br><br> <div class="ubbcode-block"><div class="ubbcode-header">Code</div><div class="ubbcode-body ubbcode-pre" ><pre>
add this before:

[code]
This will only add the "Moderators" and "More Topics Wording" but not replace your original codes.

------------------

#3:
I've disabled the "Directory" so I haven't looked at the "public_directory.pl" file. The Content Islands can be achieved if you use the javascript and add those codes. You will need to create the tables for it however.

----------------

Err...Not much help I think. LOL. tipsy
Posted By: AllenAyres Re: Borrowing from UBBDev - 02/28/2003 7:54 AM
good answers PT smile

Compact headers are what she's looking for in the second example. They haven't been updated, but I'll probably do it for 6.5 since 6.6 is a ways out - that is unless someone doesn't beat me to it wink
Posted By: ADWOFF Re: Borrowing from UBBDev - 02/28/2003 8:20 AM
Thanks, guys! smile

I did the moderator deal already--I'll give the others a look either later tonight or tomorrow.

As always, I appreciate the help I receive here at UBBDev.com; you guys are the best!
Posted By: Stilgar Re: Borrowing from UBBDev - 02/28/2003 9:21 AM
I'd like to do that " Page: 1 2 3 4 ... 19 20 21 " trick without it being in a compact header. Just so it replaces the "Dropdown field that comes stock.

Any way to do that?
Posted By: PrimeTime Re: Borrowing from UBBDev - 02/28/2003 11:01 AM
Stilgar:

*I edited because the code was too long which dragged out the the entire page. So here is a link instead. Try this:

Click Here

That might work and it might give you headaches thumbsup
Posted By: Stilgar Re: Borrowing from UBBDev - 02/28/2003 7:19 PM
Thanks PrimeTime! I'll check this code out later today.

OGzr? Heh, thanks. That's the gaming clan that I'm in. I'm not activly playing any games, but I still maintain the website and forums. Weeeeee!
Posted By: Stilgar Re: Borrowing from UBBDev - 02/28/2003 7:34 PM
Thanks again, Prime Time! It works great! It's not the most good looking thing, but it does what I need. The reason I need it is I have a dropdown menu that conflicted with the "fields" that are used in the stock version. The fields would dominate and hide parts of the dropdown menu.

Now that isn't a problem. Woohoo!
Posted By: Stilgar Re: Borrowing from UBBDev - 02/28/2003 7:51 PM
Sorry to hijack your thread, ADWOFF. smile

PT, how can keep the link in the "2", "5", "10, etc... from extending past the character?

Like: 2 5 10 20 30

and so on.

Any idea?
Posted By: ADWOFF Re: Borrowing from UBBDev - 02/28/2003 8:27 PM
LOL ... not a problem, Stilgar! I'll try to steal whatever ideas anyone else comes up with, too! wink
Posted By: PrimeTime Re: Borrowing from UBBDev - 02/28/2003 10:34 PM
Quote
quote:
Originally posted by Stilgar:
Sorry to hijack your thread, ADWOFF. smile

PT, how can keep the link in the "2", "5", "10, etc... from extending past the character?

Like: 2 5 10 20 30

and so on.

Any idea?

If I read that right I think you're asking how does the links know how many topics to display? Inside ubb_forum.cgi at around lines 130 - 155 you'll see how the "$user_topic_view" is done by using "DaysPrune". An example code:

Code
[/code]Above at the end you'll see "DaysPrune=2" which tells the link where to stop.  I only used the numbers specified in ubb_forum.cgi:

[code]
From "foreach" you can change a number around (not sure if that's necessary) and the "DaysPrune=?" to the same number, say "3", when pressing the link it will show the last 3 days.

smile

-----------

quote:
[qb]It's not the most good looking thing, but it does what I need. [/qb]
HTML & CSS can be applied into that code to customize the look. You can also change the wordlets to slim down "show pages". smile
Posted By: Stilgar Re: Borrowing from UBBDev - 02/28/2003 10:38 PM
No, actually, I was referring to the link that is created. The link itself is the #, wether it's the 2 or the 5 or the 30, but it also includes the space after the number. So the link is the number and the space right after it. Any way to make the link the number and end there? So the space following the number is just a space and not part of the link prior?

Thanks for your help. smile
Posted By: PrimeTime Re: Borrowing from UBBDev - 02/28/2003 10:56 PM
Ack...I was careless. I forgot to add the "" at the end of each number. Click the link to the file again for the changes. Sorry about that.
Posted By: Stilgar Re: Borrowing from UBBDev - 03/01/2003 1:46 AM
perfect! Thanks a million, PrimeTime!
Posted By: PrimeTime Re: Borrowing from UBBDev - 03/01/2003 2:02 AM
Glad it came out. smile
Posted By: Stilgar Re: Borrowing from UBBDev - 03/01/2003 4:04 AM
Here's what it turned out like. I tweeked it a bit:

[Linked Image]

laugh
Posted By: PrimeTime Re: Borrowing from UBBDev - 03/01/2003 4:41 AM
Very nice Stilgar. I wasn't sure if you wanted the "|" there or not and so I left that part out. laugh
Posted By: Ellen Re: Borrowing from UBBDev - 03/07/2003 5:48 PM
Quote
quote:
Originally posted by ADWOFF:

One other thing that I'd love to be able to do with the directory is put the "content islands" that I create there. How difficult (impossible?!) might that be?

As always, thanks![/QB]
If anyone knows how, I would love to be able to do this as well. Thanks again for all your anticipated help!
Posted By: AllenAyres Re: Borrowing from UBBDev - 03/08/2003 7:43 AM
You want to put CI's in your member directory, or pull the CI's in there out for use elsewhere?
Posted By: Ellen Re: Borrowing from UBBDev - 03/08/2003 8:45 PM
In my community directory, I notice that there are two Content Islands that are not included in the control panel area. These are Top Posters and Member of the Moment. They are generated as content islands in the community directory.

On the main page of my forum, I have included the content islands for last 7 posts, new members, and most recent topics. I know how to include them and they work great.

What I would like to know how to do is generate content islands for Member of the Moment or Top Poster on the front page of the forum.

Thanks in advance!
Posted By: AllenAyres Re: Borrowing from UBBDev - 03/08/2003 9:56 PM
smile

I've seen a beta of how it's done.. I'll see if I can coax him to finish it smile
Posted By: ADWOFF Re: Borrowing from UBBDev - 03/10/2003 4:31 AM
Quote
quote:
Originally posted by Ellen:
quote:
[qb]Originally posted by ADWOFF:

One other thing that I'd love to be able to do with the directory is put the "content islands" that I create there. How difficult (impossible?!) might that be?

As always, thanks![/qb]
If anyone knows how, I would love to be able to do this as well. Thanks again for all your anticipated help!
I actually figured out how to do this--on my own--no less! laugh

I went into the public_directory.pl file and tried to figure out where the other islands ended; I then created the content islands ... put them into a table, and then pasted the code into the public_directory.pl file--and there they were!

Like, Ellen, though, I'd love to be able to do a CI for the "member of the moment" ...

Coax hard, Allen! wink
Posted By: PrimeTime Re: Borrowing from UBBDev - 03/10/2003 4:53 AM
Just looking at the public_directory.pl placing the "Member of the Moment" on the forum's main page is possible. Same as what ADWOFF did I believe you can add the Directory codes into the forum summary. Initially when 6.4 just came out I was going to do something similar on the public_common.pl and my main page of the site. I haven't worked on it yet but I'm realizing that the CI has enormous potential.
Posted By: Ellen Re: Borrowing from UBBDev - 03/11/2003 2:01 AM
The code that creates the member of the moment is in public_ci_members, but I don't know enough about coding to be able to insert that applicable piece of code into public_forum_summary. I tried a couple of things, but got an error message.
Posted By: Ed Re: Borrowing from UBBDev - 03/14/2003 4:31 PM
I am looking forward to this.

Quote
quote:
Originally posted by AllenAyres:
good answers PT smile

Compact headers are what she's looking for in the second example. They haven't been updated, but I'll probably do it for 6.5 since 6.6 is a ways out - that is unless someone doesn't beat me to it wink
Posted By: ADWOFF Re: Borrowing from UBBDev - 03/31/2004 7:29 PM
I am now working on cleaning up a few things before I go from my test site to upgrading my main board ...

I am revisiting this thread because I need to know where to delete some code out of the public_forum_page.pl file


Here's a screenshot:

[Linked Image]

How do I get rid of the (Moderated by: Sue @ ADWOFF) under the Forum Name? And how do I remove the page numbers from the "Hello, Sue [log out] ..." table?

Thanks!
Posted By: Ian Spence Re: Borrowing from UBBDev - 03/31/2004 8:58 PM
Well the Moderated by is actually a CP switch now, I believe it's in Display Settings, the Forum page expandyheader.

As for the page number moving, in public_forum_page.pl

FIND:
Code
	before_navbar => qq~</font><td valign="bottom" align="right">
<font size="$vars_style{FDTextSize}" face="$vars_style{FontFace}">
$more_topics_wording
</font>
</td><font>~,
DELETE IT!
© UBB.Developers