Author |
Topic  |
hondaxr
New Member

80 Posts |
Posted - 07 July 2008 : 16:52:03
|
I would like to change the format of the Horizontal Rule (both) in a quote (Quote:). I'm assuming I need to modify lines in inc_func_common.asp and inc_func_posting.asp but I'm unclear exactly which lines I should modify. Let's just say I want to add a color (color=""#929292"") to the HR, for example.< |
|
phy1729
Average Member
  
USA
589 Posts |
Posted - 07 July 2008 : 17:01:14
|
inc_func_common 479 fString = replace(fString, "[hr]", "<hr noshade size=""1"">", 1, -1, 1) inc_func_posting 295 fString = replace(fString, "<hr noshade size=""1"">","[hr]", 1, -1, 1)
Edit: added dummy code so the hr's wouldn't get parsed< |
Edited by - phy1729 on 07 July 2008 17:02:09 |
 |
|
radiodelicate
New Member

Sweden
53 Posts |
|
hondaxr
New Member

80 Posts |
Posted - 07 July 2008 : 17:59:35
|
phy, I tried your suggestion but when I go back into a post and edit it, the code gets messed up. Any suggestions?
Thanks radio but css is not going to work for me.
I just want to change the two HRs in Quoted topics...
For example, I want to change the formating of these 2 HRs:quote:
Is this not possible?< |
Edited by - hondaxr on 07 July 2008 18:46:16 |
 |
|
phy1729
Average Member
  
USA
589 Posts |
Posted - 07 July 2008 : 19:04:22
|
Wrong hr my bad common 412 fString = doCode(fString, "[quote]", "[/quote]", "<blockquote id=""quote""><font size=""" & strFooterFontSize & """ face=""" & strDefaultFontFace & """ id=""quote"">quote:<hr height=""1"" noshade id=""quote"">", "<hr height=""1"" noshade id=""quote""></font id=""quote""></blockquote id=""quote"">") posting 97-8 fString = replace(fString, "<blockquote id=""quote""><font size=""" & strFooterFontSize & """ face=""" & strDefaultFontFace & """ id=""quote"">quote:<hr height=""1"" noshade id=""quote"">","[quote]", 1, -1, 1) fString = replace(fString, "<hr height=""1"" noshade id=""quote""></font id=""quote""></blockquote id=""quote"">","[/quote]", 1, -1, 1)
You must make sure the corrosponding hr's are identical.< |
 |
|
radiodelicate
New Member

Sweden
53 Posts |
Posted - 07 July 2008 : 19:24:36
|
quote: Originally posted by hondaxr
Thanks radio but css is not going to work for me. I just want to change the two HRs in Quoted topics...
fair enough < |
 |
|
phy1729
Average Member
  
USA
589 Posts |
Posted - 07 July 2008 : 19:36:15
|
quote: Originally posted by hondaxr
phy, I tried your suggestion but when I go back into a post and edit it, the code gets messed up. Any suggestions?
You need edited inc_func_posting to the oppisite of inc_func_common.< |
 |
|
hondaxr
New Member

80 Posts |
Posted - 08 July 2008 : 12:29:51
|
It works for new posts but when I go into older posts that have existing HRs and Submit an edit, the Quote is showing code instead of "[ quote ][ /quote ]". What am I missing?
< |
Edited by - hondaxr on 08 July 2008 12:33:54 |
 |
|
phy1729
Average Member
  
USA
589 Posts |
Posted - 08 July 2008 : 12:48:22
|
In posting you'll need both the original code and the new code in inc_func_posting or run an SQL update on the replys table to change all the old quote code to the new code. The first is eaiser the second ensures the same code accross the forum.< |
 |
|
hondaxr
New Member

80 Posts |
Posted - 08 July 2008 : 13:37:38
|
Thanks for stickin with me phy! I'm gonna attempt to update the code in the tables. Is it safe to assume that I need to change the code in both FORUM_REPLY and FORUM_A_REPLY tables? Can I use Alternative MOD Setup in my forum Admin section to accomplish this? Based on code I found searching Snitz forums, does look correct to change all existing HR heights from 1 to 2?:UPDATE FORUM_REPLY SET R_MESSAGE = REPLACE(R_MESSAGE, '<hr height=2 noshade id=quote>', '') WHERE R_MESSAGE LIKE '<hr height=1 noshade id=quote>' UPDATE FORUM_A_REPLY SET R_MESSAGE = REPLACE(R_MESSAGE, '<hr height=2 noshade id=quote>', '') WHERE R_MESSAGE LIKE '<hr height=1 noshade id=quote>' < |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 08 July 2008 : 14:00:46
|
These are SQL statements. What database are you using?
UPDATE FORUM_REPLY SET R_MESSAGE=REPLACE(R_MESSAGE,'<hr height="1" noshade id="quote">','<hr height="2" noshade id="quote">')
UPDATE FORUM_A_REPLY SET R_MESSAGE=REPLACE(R_MESSAGE,'<hr height="1" noshade id="quote">','<hr height="2" noshade id="quote">');
UPDATE FORUM_TOPICS SET T_MESSAGE=REPLACE(T_MESSAGE,'<hr height="1" noshade id="quote">','<hr height="2" noshade id="quote">');
UPDATE FORUM_A_TOPICS SET T_MESSAGE=REPLACE(T_MESSAGE,'<hr height="1" noshade id="quote">','<hr height="2" noshade id="quote">');
You will need to run this from PHPMyAdmin or SQL Server Enterprise Manager / Management Studio.< |
Snitz 3.4 Readme | Like the support? Support Snitz too |
 |
|
hondaxr
New Member

80 Posts |
Posted - 08 July 2008 : 14:07:16
|
quote: Originally posted by ruirib
What database are you using?
I believe its MS SQL 2000 or 2005. Will your example work with that?< |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 08 July 2008 : 14:10:58
|
Well, SQL Server is a bit of a pain in those cases... It will be easier if it's 2005, because you can change the columns T_MESSAGE and R_MESSAGE in the tables, from ntext to nvarchar(max) and it will run without any changes.
If you are still on SQL Server 2000, I can't do it without truncating any existing text to the first 4000 characters... I guess you will not want that.< |
Snitz 3.4 Readme | Like the support? Support Snitz too |
 |
|
hondaxr
New Member

80 Posts |
Posted - 08 July 2008 : 14:20:41
|
Ok it is 2005. I'll see about changing the table parameters...< |
 |
|
hondaxr
New Member

80 Posts |
Posted - 11 July 2008 : 12:08:42
|
To make sure I understand you correctly, I change the "ntext" parameters before I run the 4 SQL statements? Then do I change them back after I run the SQL statements? I am using Management Studio.< |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
Topic  |
|