Change post color

Snitz™ Forums 2000
https://forum.snitz.com/forumTopic/Posts/69971?pagenum=1
05 November 2025, 03:14

Topic


s80ts0465
Change post color
26 July 2011, 14:28


Is there any mod that allows to change the color of some post. For example a user before to save the new post, check an option to change the color of the post in the topic.asp page.
Bye

 

Replies ...


Carefree
26 July 2011, 15:25


The capability has always existed to change the color(s). Do you want a prompt asking the user if the post should be a different color?
s80ts0465
26 July 2011, 15:47


Probably i didn't explain well. I'd like to change the entire row color of the post, not only the text. Normally in this forum there is a bi-alternate-color, white and grey, and i'd like to offer the possibility to change the color of the entire row including the author name column. Bye Ste
AnonJr
26 July 2011, 15:49


Originally posted by Carefree
The capability has always existed to change the color(s). Do you want a prompt asking the user if the post should be a different color?

color or colour? Or have I just grown up with too much British literature? tongue
If you're talking about changing just the text colour, then Carefree is right - there are a number of colour tags available for changing the text. If you're talking about the background, or just about anything else, then the short answer is that there is nothing readily avilable.
Is there any particular reason for this request? Sometimes understanding the "why" behind a question saves us all some time in coming to a solution.
s80ts0465
26 July 2011, 16:16


Some users can have the possibility to underline the post chaging the background colour.
Carefree
26 July 2011, 21:19


OK - I know what you're wanting now. It's called the "Alternating Topic Colors Mod". I put it up on SnitzBitz.
s80ts0465
27 July 2011, 03:08


Thanks for the mod, but I think it simply alternates the two colour, instead i'm looking for a mod that allows the user to change the background colour of the post in topic.asp
Something like the Tag, but that colour the post row.
Carefree
27 July 2011, 07:57


Nothing like that has been written. Wouldn't be too difficult, but I can easily imagine some very awful color combinations.
s80ts0465
27 July 2011, 15:48


I may try to make it, but could you just suggest me from where to start. Which files should i change? Which are the variables to identify?
Ste
Carefree
27 July 2011, 20:02


Probably the easiest way to handle it would be to add another field to the database to record the desired topic color. In the default table "FORUM_TOPICS", I'd add a "T_COLOR" field. You wouldn't need to define it in "config.asp" since it won't be static.
Then in "forum.asp", you'd have to add it after the line
Code:
	tLAST_POST_AUTHOR_NAME = 14
tT_COLOR = 15
and again after the line
Code:
		Topic_LastPostAuthorName = arrTopicData(tLAST_POST_AUTHOR_NAME, iTopic)
Topic_Color = arrTopicData(tT_COLOR, iTopic)

Remember those "CColor" variable locations from the alternating color mod? You'd replace them with "Topic_Color".
In "post.asp" and in "post_info.asp", you'd have to include the new field in forms and in SQL calls/updates to the database.

That'll get you started. If you run aground, ask for help and we'll give you a hand.
s80ts0465
28 July 2011, 06:54


Ok tahnks a lot. I'll do that and than let you know.
Bye Ste
s80ts0465
04 August 2011, 06:01


I did it, and works great. Thanks.
Another question....how can i bypass the waiting time after a new topic or post is saved. I'd like to eliminated the screen with
"New Reply Posted! Thank you for your contribution! Back to Category"
and directly go ahead to the topic.asp page.
HuwR
04 August 2011, 11:30


in post_info.asp look for the following code
Code:

		Response.write	"</font></p>" & vbNewLine & _
" <meta http-equiv=""Refresh"" content=""2; URL=" & strReturnURL & """>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>"
select case MethodType
case "Category"
Response.Write("Remember to create at least one new forum in this category.")
case "Forum"
Response.Write("The new forum is ready for users to begin posting!")
case "EditForum", "EditCategory"
Response.Write("Thank you for your contribution!")
case "URL"
Response.Write("The new URL is in place!")
case "EditURL"
Response.Write("Cheers! Have a nice day!")
case "Topic", "TopicQuote", "EditTopic", "Reply", "ReplyQuote", "Edit"
Response.Write("Thank you for your contribution!")
case else
Response.Write("Have a nice day!")
end select
Response.write "</font></p>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""" & strReturnURL & """>" & strReturnTxt & "</a></font></p>" & vbNewLine
it should be near the end, just above the
sub newForumMembers(fForumID) function
Replace all the code above with

Response.write "</font></p>" & vbNewLine
Response.Redirect(strReturnURL)

disclaimer I haven't tested this so make sure you take a copy of post_info first so you can roll it back
s80ts0465
04 August 2011, 15:00


Yes, it works.
Thanks Ste
golfmann
05 August 2011, 10:38


You know what would be a nice mod? A link preview kind of thing like they have on facebook.
It takes your link and both checks it and puts in the picture and a small blurb plus the link.
Waaaaaay over my head to do, but it IS nice, I think.
AnonJr
08 August 2011, 12:29


Golfmann, There have been some discussions about that in the past. Opinions vary as to how "nice" that would be. wink
golfmann
09 August 2011, 00:16


Well I would like it mean
© 2000-2021 Snitz™ Communications