New messages Members Forum rules Search
  • Page 1 of 1
  • 1
Forum moderator: kostova  
uCoz Support Forum by uCozers » uCoz » Forum » Select category icon in forum (sml[tutorial])
Select category icon in forum
jackassDate: Friday, 2009 July 10, 6:32 PM | Message # 1
Font size: A | A |
Major general
Group: Administrator
Message: 433
[ ]
Offline
So what we will make will look like this

In this images style is different than in tutorial, so you can adjust it how you like

1. Go to your CSS and add this code after /* forum Post Form */

Code
.thDescr,
.threadDescr {display:none}
#frM30 img {opacity:.33; -moz-opacity: 0.33; filter: alpha(opacity=33);}               
#frM30 img:hover {opacity:.5; -moz-opacity: 0.5; filter: alpha(opacity=50);}               
#frM30 img.selectedImg {opacity:1; ; -moz-opacity: 1; filter: alpha(opacity=100);}



[cut=IMPORTANT MESSAGE]
IF YOU ARE USING IMAGE RESIZE IN FORUM, THAN YOU MUST ADD THIS CODE

Code
.thDescr,
.threadDescr {display:none}
#frM30 img {opacity:.33; -moz-opacity: 0.33; filter: alpha(opacity=33);}               
#frM30 img:hover {opacity:.5; -moz-opacity: 0.5; filter: alpha(opacity=50);}               
#frM30 img.selectedImg {opacity:1; ; -moz-opacity: 1; filter: alpha(opacity=100);}

AFTER THIS

Code
.posttdMessage img {
max-width:500px;
width:expression((this.width>500) ? "500px" : true);
}
.posttdMessage img {
max-height:700px;
height:expression((this.height>700) ? "700px" : true);
[/cut]


2. Go to Message addition form and replace $_THREAD_DESCR$ with

Code
<input type="text" id="threadAbout" value="" class="postDescrFl" size="60" maxlength="50" />
<img src="http://s3.ucoz.net/img/fr/ic1/thread.gif" alt="Default" class="selectedImg" />
<img src="http://example.com/images/threadIcons/Answered.png" alt="Answer" />
<img src="http://example.com/images/threadIcons/Error.png" alt="Error" />
<img src="http://example.com/images/threadIcons/Help.png" alt="Help" />
<img src="http://example.com/images/threadIcons/Info.png" alt="Info" />
<img src="http://example.com/images/threadIcons/Tutorial.png" alt="Tutorial" />
<div style="display:none">$_THREAD_DESCR$</div>

3. Go to General appearance of forum pages after $BODY$ isert this code



[cut=IMPORTANT MESSAGE]
IF YOU ARE USING BBCOMPLEX THAN ADD THIS CODE

Code
<script type="text/javascript">$('.thDescr').each(function(){
           var s = $(this).html().match( /sml\[(\w+)\]/ );
           $(this).show();
           if (s==null) return;
           var name = s[1];
           s = s[0];
           $(this).html( $(this).html().replace(s,'') );
           if( $(this).html()=='()' ) $(this).html('');
           if( $('table.gTable:first td.gTableTop div.gTopCornerRight + img').size()==0 ) $('table.gTable:first td.gTableTop div.gTopCornerRight').after('<img src="/images/threadIcons/'+name+'.png" /> ');
})
$('.threadDescr').each(function(){
           var s = $(this).html().match( /sml\[(\w+)\]/ );
           $(this).show();
           if (s==null) return;
           var name = s[1];
           s = s[0];
           $(this).html( $(this).html().replace(s,'') );
           $(this).parent().prev().find('img').attr('src','/images/threadIcons/'+name+'.png');
});
</script>

<script type="text/javascript">
$('#frF3').css('width','auto').attr('size', 60);
$('#frM30 img').click(function(){
           $('#frM30 .selectedImg').removeClass('selectedImg');
           $(this).addClass('selectedImg')
});
if( $('#frF4').val()!='' ){
           if( $('#frF4').val().match( /sml\[\w+\]/ ) ){
           $('#threadAbout').val( $('#frF4').val().replace( $('#frF4').val().match( /sml\[(\w+)\]/ )[0], '' ) );
           $('#frM30 .selectedImg').removeClass('selectedImg');
           $('#frM30 img[src$="'+ $('#frF4').val().match( /sml\[(\w+)\]/ )[1] +'.png"]').addClass('selectedImg');
           } else $('#threadAbout').val( $('#frF4').val() );
}
function checksubmit(){
           var s = $('#frM30 .selectedImg').attr('src').match( /\/(\w*)\.png/i );
           if( s!=null ) s = 'sml['+s[1]+']'; else s='';
           $('#frF4').val( s + $('#threadAbout').val() );
           return true;
}</script>

AFTER THIS

Code
<script type="text/javascript" language="javascript" src="http://www.ucozers.ucoz.com/Scripts/bb_codes/bbcomplex.js"></script><script type="text/javascript">var ShowHiddenSpoiler='$USER_LOGGED_IN$';StartBBComplex();</script>

[/cut]



Code
<script type="text/javascript">$('.thDescr').each(function(){
           var s = $(this).html().match( /sml\[(\w+)\]/ );
           $(this).show();
           if (s==null) return;
           var name = s[1];
           s = s[0];
           $(this).html( $(this).html().replace(s,'') );
           if( $(this).html()=='()' ) $(this).html('');
           if( $('table.gTable:first td.gTableTop div.gTopCornerRight + img').size()==0 ) $('table.gTable:first td.gTableTop div.gTopCornerRight').after('<img src="/images/threadIcons/'+name+'.png" /> ');
})
$('.threadDescr').each(function(){
           var s = $(this).html().match( /sml\[(\w+)\]/ );
           $(this).show();
           if (s==null) return;
           var name = s[1];
           s = s[0];
           $(this).html( $(this).html().replace(s,'') );
           $(this).parent().prev().find('img').attr('src','/images/threadIcons/'+name+'.png');
});
</script>

<script type="text/javascript">
$('#frF3').css('width','auto').attr('size', 60);
$('#frM30 img').click(function(){
           $('#frM30 .selectedImg').removeClass('selectedImg');
           $(this).addClass('selectedImg')
});
if( $('#frF4').val()!='' ){
           if( $('#frF4').val().match( /sml\[\w+\]/ ) ){
           $('#threadAbout').val( $('#frF4').val().replace( $('#frF4').val().match( /sml\[(\w+)\]/ )[0], '' ) );
           $('#frM30 .selectedImg').removeClass('selectedImg');
           $('#frM30 img[src$="'+ $('#frF4').val().match( /sml\[(\w+)\]/ )[1] +'.png"]').addClass('selectedImg');
           } else $('#threadAbout').val( $('#frF4').val() );
}
function checksubmit(){
           var s = $('#frM30 .selectedImg').attr('src').match( /\/(\w*)\.png/i );
           if( s!=null ) s = 'sml['+s[1]+']'; else s='';
           $('#frF4').val( s + $('#threadAbout').val() );
           return true;
}</script>

If something is not working then post here!
Attachments: 9267321.png (10.9 Kb)


 
barc00deDate: Friday, 2009 July 10, 9:39 PM | Message # 2
Font size: A | A |
Lieutenant
Group: uCozer
Message: 55
[ ]
Offline
something is not working in my web pelezz heelp my

Added (2009-07-10, 9:04 Pm)
---------------------------------------------
(If not selected, than will be default)

Added (2009-07-10, 9:39 Pm)
---------------------------------------------
jackass Regjister in my site end I giv you Pass CP end help my
http://demonboy.ucoz.com/

 
jackassDate: Friday, 2009 July 10, 11:28 PM | Message # 3
Font size: A | A |
Major general
Group: Administrator
Message: 433
[ ]
Offline
barc00de, did you upload your icons and set location in code?

What is not working?


 
BrazenDate: Friday, 2009 July 10, 11:49 PM | Message # 4
Font size: A | A |
Colonel
Group: Administrator
Message: 304
[ ]
Offline
Quote (barc00de)
(If not selected, than will be default)

jackass, I can't find this phrase in any of the scripts you provided above.


LOL With Us! l Game Blog l 3D Autos

"knowledge without wisdom is curse" Alex Seb

 
barc00deDate: Saturday, 2009 July 11, 0:14 AM | Message # 5
Font size: A | A |
Lieutenant
Group: uCozer
Message: 55
[ ]
Offline
yes
 
jackassDate: Saturday, 2009 July 11, 4:37 PM | Message # 6
Font size: A | A |
Major general
Group: Administrator
Message: 433
[ ]
Offline
Quote (jackass)
In this images style is different than in tutorial, so you can adjust it how you like

In this tutorial it isn't

You can add it yourself wink


 
farhan411Date: Thursday, 2010 July 29, 5:42 PM | Message # 7
Font size: A | A |
Private
Group: User
Message: 1
[ ]
Offline
hi friends! i have a problem in my forum.

Quote

/* forum Navigation Bar */
.forumNamesBar {padding-bottom:7px;font-weight:bold;font-size:7pt;}
.forumBarKw {font-weight:normal;}
a.forumBarA:link {text-decoration:none; color:#CCCCCC;}
a.forumBarA:visited {text-decoration:none; color:#CCCCCC;}
a.forumBarA:hover {text-decoration:underline; color:#FFFFFF;}
a.forumBarA:active {text-decoration:underline; color:#CCCCCC;}
/* -------------------- */

/* forum Fast Navigation Blocks */
.fastNav,.fastSearch,.fastLoginForm {font-size:7pt;}
/* ---------------------------- */

/* forum Fast Navigation Menu */
.fastNavMain {background:#862D2D;color:#FFFFFF;}
.fastNavCat {background:#F9E6E6;}
.fastNavCatA {background:#F9E6E6;color:#0000FF}
.fastNavForumA {color:#0000FF}
/* -------------------------- */

/* forum Page switches */
.pagesInfo {background:#202020;padding-right:10px;font-size:7pt;}
.switches {background:#2B2B2B;}
.switch {background:#202020;width:15px;font-size:7pt;}
.switchActive {background:#555555;font-weight:bold;color:#CCCCCC;width:15px}
a.switchDigit:link,a.switchBack:link,a.switchNext:link {text-decoration:none; color:#CCCCCC;}
a.switchDigit:visited,a.switchBack:visited,a.switchNext:visited {text-decoration:none; color:#CCCCCC;}
a.switchDigit:hover,a.switchBack:hover,a.switchNext:hover {text-decoration:underline; color:#FFFFFF;}
a.switchDigit:active,a.switchBack:active,a.switchNext:active {text-decoration:underline; color:#CCCCCC;}
/* ------------------- */

/* forum Threads Style */
.threadNametd,.threadAuthTd,.threadLastPostTd {padding:2px;padding:2px;background:#202020}
.threadIcoTd,.threadPostTd,.threadViewTd {padding:2px;background:#222222}
.threadLastPostTd {padding:2px;font-size:7pt;}
.threadDescr {color:#666666;font-size:7pt;}
.threadNoticeLink {font-weight:bold;}
.threadsType {padding:2px;background:#222222;height:20px;font-weight:bold;font-size:7pt;color:#FFFFFF;padding-left:40px; border:1px solid #494949;}
.threadsDetails {padding:2px;background:#373737;height:20px;color:#555555;color:#FFFFFF;border:1px solid #494949;}
.forumOnlineBar {padding:2px;background:#161616;height:20px;color:#CCCCCC;border:1px solid #494949;}

a.threadPinnedLink:link {text-decoration:none; color:#CCCCCC;}
a.threadPinnedLink:visited {text-decoration:none; color:#CCCCCC;}
a.threadPinnedLink:hover {text-decoration:underline; color:#FFFFFF;}
a.threadPinnedLink:active {text-decoration:underline; color:#CCCCCC;}

.threadPinnedLink,.threadLink {font-weight:bold;}
a.threadLink:link {text-decoration:underline; color:#CCCCCC;}
a.threadLink:visited {text-decoration:underline; color:#CCCCCC;}
a.threadLink:hover {text-decoration:none; color:#FFFFFF;}
a.threadLink:active {text-decoration:underline; color:#CCCCCC;}

.postpSwithces {font-size:7pt;}
.thDescr {font-weight:normal;}
.threadFrmBlock {font-size:7pt;text-align:right;}
/* ------------------- */

/* Posts View */

.thDescr,
.threadDescr {display:none}
#frM30 img {opacity:.33; -moz-opacity: 0.33; filter: alpha(opacity=33);}
#frM30 img:hover {opacity:.5; -moz-opacity: 0.5; filter: alpha(opacity=50);}
#frM30 img.selectedImg {opacity:1; ; -moz-opacity: 1; filter: alpha(opacity=100);}

.postTable {background:#555555}
.postPoll {background:#222222;text-align:center;}
.postFirst {background:#222222;border-bottom:1px solid silver;}
.postRest1 {background:#222222;}
.postRest2 {background:#222222;}
.postSeparator {height:2px;background:#CCCCCC;}

.postTdTop {background:url('/.s/t/853/16.gif') #000000;color:#767676;height:21px;font-size:10px;border:1px solid #494949;}
.postBottom {background:#202020;height:20px;color:#555555;}
.postUser {font-weight:bold;}
.postTdInfo {background:#222222;text-align:center;padding:5px;}
.postRankName {margin-top:5px;}
.postRankIco {margin-bottom:5px;margin-bottom:5px;}
.reputation {margin-top:5px;}
.signatureHr {margin-top:20px;color:#CCCCCC;}
.posttdMessage {background:#202020;padding:5px;}

.postPoll {padding:5px;}
.pollQuestion {text-align:center;font-weight:bold;}
.pollButtons,.pollTotal {text-align:center;}
.pollSubmitBut,.pollreSultsBut {width:140px;font-size:7pt;}
.pollSubmit {font-weight:bold;}
.pollEnd {text-align:center;height:30px;}

.codeMessage {background:#555555;font-size:9px;}
.quoteMessage {background:#555555;font-size:9px;}

.signatureView {font-size:7pt;}
.edited {padding-top:30px;font-size:7pt;text-align:right;color:#555555;}
.editedBy {font-weight:bold;font-size:8pt;}

.statusBlock {padding-top:3px;}
.statusOnline {color:#FFFF00;}
.statusOffline {color:#FFFFFF;}
/* ---------- */

/* forum AllInOne Fast Add */
.newThreadBlock {background: #F9F9F9;border: 1px solid #B2B2B2;}
.newPollBlock {background: #F9F9F9;border: 1px solid #B2B2B2;}
.newThreadItem {padding: 0 0 0 8px; background: url('/.s/t/853/17.gif') no-repeat 0px 4px;}
.newPollItem {padding: 0 0 0 8px; background: url('/.s/t/853/17.gif') no-repeat 0px 4px;}
/* ----------------------- */

/* Post Form */
.pollBut, .loginButton, .searchSbmFl, .commSbmFl, .signButton {font-size:7pt;background: #333333;color:#FFFFFF;border:1px outset #333333;}

.codeButtons {font-size:7pt;background: #333333;color:#FFFFFF;border:1px outset #333333;}
.codeCloseAll {font-size:7pt;background: #333333;color:#FFFFFF;border:1px outset #333333;font-weight:bold;}
.postNameFl,.postDescrFl {background:#2C2C2C;border:1px solid #555555;width:400px}
.postPollFl,.postQuestionFl {background:#2C2C2C;border:1px solid #555555;width:400px}
.postResultFl {background:#2C2C2C;border:1px solid #555555;width:50px}
.postAnswerFl {background:#2C2C2C;border:1px solid #555555;width:300px}
.postTextFl {background:#2C2C2C;border:1px solid #555555;width:550px;height:150px;color:#666666;}
.postUserFl {background:#2C2C2C;border:1px solid #555555;width:300px}

.pollHelp {font-weight:normal;font-size:7pt;padding-top:3px;}
.smilesPart {padding-top:5px;text-align:center}
/* --------- */

/* ====== forum End ====== */

its my forum css. here is no $_THREAD_DESCR$ . so please help me .i am great thanksful to you for this.

 
uCoz Support Forum by uCozers » uCoz » Forum » Select category icon in forum (sml[tutorial])
  • Page 1 of 1
  • 1
Search:


Copyrights uCozers 2009 - 2024 To TOP
Refresh Smileys Manager