Author |
Topic |
NiteOwl
Junior Member
Canada
403 Posts |
Posted - 20 February 2005 : 23:11:12
|
I would like to make one of my categories stand out, for instance, it is now green and I would like to make it have a background of blue, however just one category not all of them.
Is this possible?
|
-=NiteOwl=-
|
Edited by - NiteOwl on 22 February 2005 00:14:08 |
|
Jorrit787
Average Member
Netherlands
681 Posts |
Posted - 21 February 2005 : 00:03:26
|
There is a Forum Theme MOD available from Snitzbitz - You could try modifying it so that it works for categories in stead of forums. |
eXtremeGossip |
|
|
Classicmotorcycling
Development Team Leader
Australia
2084 Posts |
Posted - 21 February 2005 : 00:05:04
|
It should be with an if statement. Like just a a quick think and we say it is catergory id 3 you want highlighted:
if Cat_ID = "3" then
Response.Write "<a href=""default.asp?CAT_ID=" & CatID & """ title=""Highlighted Cat""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""#0066cc""><b>" & ChkString(CatName,"display") & "</b></font></a></td>" & vbNewline
else
Response.Write "<a href=""default.asp?CAT_ID=" & CatID & """ title=""View only the Forums in this Category""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><b>" & ChkString(CatName,"display") & "</b></font></a></td>" & vbNewline
end if I am not sure if that will work, but I am sure that just alittle tweaking and it would work for you.
I hope it helps.
Cheers. |
Cheers, David Greening |
|
|
NiteOwl
Junior Member
Canada
403 Posts |
Posted - 21 February 2005 : 01:26:11
|
I will try this, can you point me to the file you figure I should edit.
|
-=NiteOwl=-
|
|
|
Classicmotorcycling
Development Team Leader
Australia
2084 Posts |
Posted - 21 February 2005 : 02:45:25
|
In default.asp I have been playing with it to have some minor success with:
If you look for:Call DoHideCategory(CatID) And then replace this line: Response.Write " <td bgcolor=""" & strCategoryCellColor & """ colspan=""" & sGetColspan(5,5) & """ valign=""top"">" with this: if Cat_ID = "3" then
Response.Write " <td bgcolor=""#0099cc"" colspan=""" & sGetColspan(5,5) & """ valign=""top"">"
else
Response.Write " <td bgcolor=""" & strCategoryCellColor & """ colspan=""" & sGetColspan(5,5) & """ valign=""top"">"
end if It allows the Category to be highlighted when it is selected. Still need to work on it a bit more. I hope it points you in the right direction.
|
Cheers, David Greening |
|
|
NiteOwl
Junior Member
Canada
403 Posts |
Posted - 21 February 2005 : 09:49:47
|
Yes, thats very cool I was able to get that results also, however all I really need is for the initial page to display the highlighted category, before one selects it.
|
-=NiteOwl=-
|
Edited by - NiteOwl on 22 February 2005 00:14:24 |
|
|
Classicmotorcycling
Development Team Leader
Australia
2084 Posts |
Posted - 21 February 2005 : 17:01:51
|
Still playing with that. Just have a heap of other stuff to do before I can spend a bit of time on it, but bear with me and I am sure that we can come up with a solution soon.
|
Cheers, David Greening |
|
|
Classicmotorcycling
Development Team Leader
Australia
2084 Posts |
Posted - 21 February 2005 : 19:45:10
|
OK, played with it some more and have come up with the following:
In Snitz 3.4.05 in a untouched default.asp you need to change the following:
Find the following code at Line 467: Call DoHideCategory(CatID)
Response.Write " <tr>" & vbNewline & _
" <td bgcolor=""" & strCategoryCellColor & """ colspan=""" & sGetColspan(6,5) & """ valign=""top"">"
'##### This code will specify whether or not to show the forums under a category #####
HideForumCat = strUniqueID & "HideCat" & CatID
if Request.Cookies(HideForumCat) = "Y" then
Response.Write "<a href=""" & ScriptName & "?" & HideForumCat & "=N&CAT_ID=" & Cat_ID & """>" & getCurrentIcon(strIconPlus,"Expand This Category","") & "</a>"
else
Response.Write "<a href=""" & ScriptName & "?" & HideForumCat & "=Y&CAT_ID=" & Cat_ID & """>" & getCurrentIcon(strIconMinus,"Collapse This Category","") & "</a>"
end if
if Cat_ID = "" then
Response.Write " <a href=""default.asp?CAT_ID=" & CatID & """ title=""View only the Forums in this Category""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><b>" & ChkString(CatName,"display") & "</b></font></a> </td>" & vbNewline
else
Response.Write " <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><b>" & ChkString(CatName,"display") & "</b></font> </td>" & vbNewline
end if
'##### Above code will specify whether or not to show the forums under a category #####
Response.Write " <td bgcolor=""" & strCategoryCellColor & """ align=""center"" valign=""top"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>"
if (mLev = 4 or mLev = 3) or (lcase(strNoCookies) = "1") then
call CategoryAdminOptions()
elseif (mLev > 0) then
call CategoryMemberOptions()
else
Response.Write(" ")
end if
Response.Write "</font></b></td>" & vbNewline
Response.Write " </tr>" & vbNewline
chkDisplayHeader = false Replace with the following: Call DoHideCategory(CatID)
Response.Write " <tr>" & vbNewline
if CatName = CatNameHighLight then
Response.Write " <td bgcolor=""" & CatNameColor & """ colspan=""" & sGetColspan(6,5) & """ valign=""top"">"
else
Response.Write " <td bgcolor=""" & strCategoryCellColor & """ colspan=""" & sGetColspan(6,5) & """ valign=""top"">"
end if
'##### This code will specify whether or not to show the forums under a category #####
HideForumCat = strUniqueID & "HideCat" & CatID
if Request.Cookies(HideForumCat) = "Y" then
Response.Write "<a href=""" & ScriptName & "?" & HideForumCat & "=N&CAT_ID=" & Cat_ID & """>" & getCurrentIcon(strIconPlus,"Expand This Category","") & "</a>"
else
Response.Write "<a href=""" & ScriptName & "?" & HideForumCat & "=Y&CAT_ID=" & Cat_ID & """>" & getCurrentIcon(strIconMinus,"Collapse This Category","") & "</a>"
end if
if Cat_ID = "" then
Response.Write " <a href=""default.asp?CAT_ID=" & CatID & """ title=""View only the Forums in this Category""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><b>" & ChkString(CatName,"display") & "</b></font></a> </td>" & vbNewline
else
Response.Write " <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><b>" & ChkString(CatName,"display") & "</b></font> </td>" & vbNewline
end if
'##### Above code will specify whether or not to show the forums under a category #####
if CatName = CatNameHighLight then
Response.Write " <td bgcolor=""" & CatNameColor & """ align=""center"" valign=""top"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>"
else
Response.Write " <td bgcolor=""" & strCategoryCellColor & """ align=""center"" valign=""top"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>"
end if
if (mLev = 4 or mLev = 3) or (lcase(strNoCookies) = "1") then
call CategoryAdminOptions()
elseif (mLev > 0) then
call CategoryMemberOptions()
else
Response.Write(" ")
end if
Response.Write "</font></b></td>" & vbNewline
Response.Write " </tr>" & vbNewline
chkDisplayHeader = false Now at the top at about Line 45 add the following:CatNameHighLight = "(put in the name of the category to highlight minus the brackets)"
CatNameColor = "(add your color you want to show as the highlight minus the brackets; i.e.: #0099cc)" I hope that is easy enough to uderstand. If you are having issues NiteOwl, send me your default.asp and I will edit it for you.
<edit>This is now updated to suit the moderator columns</edit> |
Cheers, David Greening |
Edited by - Classicmotorcycling on 22 February 2005 00:27:38 |
|
|
NiteOwl
Junior Member
Canada
403 Posts |
Posted - 21 February 2005 : 21:50:08
|
Is this the expected format at line ~45
CatNameHighLight = "(C H A T - F O R U M)" CatNameColor = "(#0099cc)"
I am close but not quite there I suspect.
|
-=NiteOwl=-
|
|
|
NiteOwl
Junior Member
Canada
403 Posts |
Posted - 21 February 2005 : 21:52:16
|
Wait, a slight adjustment like this and it works!!!
CatNameHighLight = ("C H A T - F O R U M") CatNameColor = ("#0099cc")
Thank you this is what I am looking for!!! very cool.
|
-=NiteOwl=-
|
|
|
Classicmotorcycling
Development Team Leader
Australia
2084 Posts |
Posted - 21 February 2005 : 22:08:36
|
No need for the ( ) (brakets), but I am glad it worked for you. So where abouts is it being used. Would like to see it working on another site rather than my own.. |
Cheers, David Greening |
|
|
NiteOwl
Junior Member
Canada
403 Posts |
Posted - 21 February 2005 : 22:23:23
|
here is my development site http://24.108.167.17/bcfmwu_dev_snitz/forumNEW/default.asp <-fixed
username test / test
I do have one last thing that you will see and that is the last cell goes dark blue for some reason. and it actualy coloours all the cells in that colum |
-=NiteOwl=-
|
Edited by - NiteOwl on 21 February 2005 23:33:46 |
|
|
NiteOwl
Junior Member
Canada
403 Posts |
Posted - 21 February 2005 : 22:28:44
|
Update: It occurred to me that as the administrator I see more, so I logged in as a regular user and the last cell does not appear so its not dk blue, so my users will never see the problem, I will set the test account to be a moderator and you can see what i am seeing. Would this be easy to fix?
|
-=NiteOwl=-
|
Edited by - NiteOwl on 22 February 2005 00:15:11 |
|
|
Classicmotorcycling
Development Team Leader
Australia
2084 Posts |
Posted - 21 February 2005 : 23:16:40
|
The test site did not work, can not find it.
It would be easy to fix. Just need to look at your default.asp file and it should be fine. If you want to send an email to webmaster [at] classicmotorcycling.com.au with it attached I will look at it for you.
I have just made a general area in the MOD I just created to be viewed by all. It is at http://www.classicmotorcycling.com.au/forum/ and you will notice that I have got the "Eligibilty Area" highlighted in red, to set it aside from the rest of the site. I do not have any issues with the line not showing correctly.
This mod can be changed to include a graphic for the category if needed. Let me know if you want me to look at your default.asp file NightOwl..
|
Cheers, David Greening |
|
|
NiteOwl
Junior Member
Canada
403 Posts |
|
NiteOwl
Junior Member
Canada
403 Posts |
Posted - 22 February 2005 : 00:13:02
|
Got your email, that did it, thanks very much it works beautifully. You might want to post that last bit of code, i bet others would like this!
|
-=NiteOwl=-
|
Edited by - NiteOwl on 22 February 2005 00:13:49 |
|
|
Topic |
|