The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Colorize cell wont work

4 posters

Go down

Solved Colorize cell wont work

Post by TheCrow Mon 13 Oct 2014 - 23:52

Hello,
Via the new tutorial Ange provided, i tried adding the codes and instead of a background color to be a background image. But unfortunately the code wont work.
My forum website: http://informationforumgr.forumgreek.com/forum
Forum Version: PunBB

Regards,
MrMind.
TheCrow
TheCrow
Manager
Manager

Male Posts : 6913
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Solved Re: Colorize cell wont work

Post by _Twisted_Mods_ Tue 14 Oct 2014 - 2:01

can u provide the code you are using
_Twisted_Mods_
_Twisted_Mods_
Helper
Helper

Male Posts : 2108
Reputation : 336
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: Colorize cell wont work

Post by Ange Tuteur Tue 14 Oct 2014 - 2:10

Hello MrMind,

Did you use the background property instead of background-color ? ( You can use background-image too )
Code:
tr.newpost td { background:url('IMG_SRC') !important }

Replace IMG_SRC by the URL of your image.
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Colorize cell wont work

Post by Van-Helsing Tue 14 Oct 2014 - 2:39

Hello all,
I have test it on my forum and working fine the problem with Mr. Mind's forum is because he has removed the icons of the forum near categories (on the left) here is an example of my forum http://prntscr.com/4vykuj . The javascript reads this icon of each forum row.

Furthermore the javascript can be work in subforums too by changing the second image url in it.

Code:

$(function() {
  $('img[src="IMAGE URL"]').closest('tr').addClass('newpost');
  $('img[src="IMAGE URL"]').closest('tr').addClass('newpost');
});
In the second IMAGE URL you can colorize the icon of post with new replies like this http://prntscr.com/4vylxn .

Finally check the checkboxes in homepage and in subforums.

Best Regards,
Black-Shadow
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: Colorize cell wont work

Post by TheCrow Tue 14 Oct 2014 - 9:07

Hello all,

@thetwistedkilla: the codes i am using are the same as the ones Ange provided in the tutorial.
@Ange: Yes i tried that. My problem is that i am trying only to add an image instead of the row color because i have the row color already. I don't know why it won't take it. Which image am images am i supposed to add in the js? The one for the last post and the one for the sub_category new icon? Or the ones Black Shadow showed?
@Black Shadow: The tutorial does not say that i must add the icon for the row that you showed but i will wait for Ange to tell me what i am doing wrong!

Here is exactly what i am using:
JAVASCRIPT:
Code:
$(function() {
  $('img[src="http://2img.net/i/fa/subsilver/icon_newest_reply.gif"]').closest('tr').addClass('newpost');
  $('img[src="http://2img.net/i/fa/prosilver/icon_post_target_unread.gif"]').closest('tr').addClass('newpost');
});
Colorize cell wont work MwzhC30 Colorize cell wont work YbjbYtt

CSS:
Code:
tr.newpost td {background:url(https://cdn2.iconfinder.com/data/icons/Siena/48/label_new.png) no-repeat !important;}
TheCrow
TheCrow
Manager
Manager

Male Posts : 6913
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Solved Re: Colorize cell wont work

Post by Van-Helsing Tue 14 Oct 2014 - 11:06

Hello Mr. Mind,
The javascript works with these icons http://prntscr.com/4w1buw for the board index and for these icons http://prntscr.com/4w1ck0 in subforums.

Best Regards,
Black-Shadow
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: Colorize cell wont work

Post by Ange Tuteur Tue 14 Oct 2014 - 14:57

Black-Shadow provided you with the correct info. For the index you would use the "Icons for the forum." There's two for you to include the category and forum icon.
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Colorize cell wont work

Post by TheCrow Tue 14 Oct 2014 - 16:25

Those icons are not displayable in the forum index or the subforum preview. They must be visible so the code to work?
TheCrow
TheCrow
Manager
Manager

Male Posts : 6913
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Solved Re: Colorize cell wont work

Post by Ange Tuteur Tue 14 Oct 2014 - 16:28

They must, at the very least exist in the HTML document. They can be hidden by CSS, but if they are not in the document it wont work. Wink
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Colorize cell wont work

Post by TheCrow Tue 14 Oct 2014 - 16:29

SO i can have them visible to the forum but with opacity 0 correct?
TheCrow
TheCrow
Manager
Manager

Male Posts : 6913
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Solved Re: Colorize cell wont work

Post by Ange Tuteur Tue 14 Oct 2014 - 16:32

Yes, you are correct. Wink
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Colorize cell wont work

Post by TheCrow Tue 14 Oct 2014 - 16:34

Ok what is the element for those icons for the index?
For the subforums icon i set them with opacity 0 but i don't know the element for the index icons! :/
TheCrow
TheCrow
Manager
Manager

Male Posts : 6913
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Solved Re: Colorize cell wont work

Post by Ange Tuteur Tue 14 Oct 2014 - 16:38

In the index_box template, it should be :
Code:
                     <span class="status" style="margin-right: -{catrow.forumrow.INC_WIDTH_ICON}; margin-left: -{catrow.forumrow.INC_WIDTH_ICON};">
                        <img title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" src="{catrow.forumrow.FORUM_FOLDER_IMG}" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" />
                     </span>

Inside :
Code:
<td class="tcl" style="padding-right: {catrow.forumrow.INC_LEVEL_RIGHT}; padding-left: {catrow.forumrow.INC_LEVEL_LEFT};">
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Colorize cell wont work

Post by TheCrow Tue 14 Oct 2014 - 16:39

Ok yes i added that. But still with that and set to opacity 0 the image i wont is not visible...
TheCrow
TheCrow
Manager
Manager

Male Posts : 6913
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Solved Re: Colorize cell wont work

Post by Ange Tuteur Tue 14 Oct 2014 - 16:48

This image ?
Colorize cell wont work Captu179

or the new post one ?
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Colorize cell wont work

Post by TheCrow Tue 14 Oct 2014 - 16:58

No. This is the image i want to be visible as soon as a post is posted instead of a background color.
Colorize cell wont work RZtKY1u
But i get it 3 times instead of once. And also the one i want is not visible.
I only want this one to be visible
Colorize cell wont work N6xLhOu
TheCrow
TheCrow
Manager
Manager

Male Posts : 6913
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Solved Re: Colorize cell wont work

Post by Ange Tuteur Tue 14 Oct 2014 - 17:00

Could you provide your CSS rule ?

Thanks
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Colorize cell wont work

Post by TheCrow Tue 14 Oct 2014 - 17:02

Ofc.
Code:
tr.newpost td{ background:url(http://i39.servimg.com/u/f39/18/45/97/69/oo10.png) no-repeat !important;z-index:1!important; }
TheCrow
TheCrow
Manager
Manager

Male Posts : 6913
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Solved Re: Colorize cell wont work

Post by Ange Tuteur Tue 14 Oct 2014 - 17:18

Try this :
Code:
tr.newpost { background:url(http://i39.servimg.com/u/f39/18/45/97/69/oo10.png) no-repeat 100% 0% !important }

Since it's a background image, the z-index property wont work. Your description icons would need moving around, or you could place the image elsewhere. Adjust the percentages to move the image around. (100% 0%)
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Colorize cell wont work

Post by TheCrow Tue 14 Oct 2014 - 17:22

I want it to be over the image of the category. Only there.

Edit: To be exact, set the background 2% (for the one you sent) and you will see where i want the left image only to be.
TheCrow
TheCrow
Manager
Manager

Male Posts : 6913
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Solved Re: Colorize cell wont work

Post by Ange Tuteur Tue 14 Oct 2014 - 17:30

Weeell, you could add it in by JavaScript :
Modules > JavaScript codes management > Create a new script

Title : Your choice
Placement : In the home page (and anywhere else you want it to work)
Paste the code below and submit :
Code:
$(function() {$('tr.newpost').append('<img class="newImg" src="http://i39.servimg.com/u/f39/18/45/97/69/oo10.png">')});

Then add this to CSS :
Display > Colors > CSS stylesheet
Code:
tr.newpost { position:relative }
tr.newpost .newImg {
  position:absolute;
  left:8px;
  top:0;
}
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Colorize cell wont work

Post by TheCrow Tue 14 Oct 2014 - 17:32

I have to have both javascripts right?
TheCrow
TheCrow
Manager
Manager

Male Posts : 6913
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Solved Re: Colorize cell wont work

Post by Ange Tuteur Tue 14 Oct 2014 - 17:39

Yes, but you could add this :
Code:
$(function() {$('tr.newpost').append('<img class="newImg" src="http://i39.servimg.com/u/f39/18/45/97/69/oo10.png">')});

In with the one that checks for the images. It would have to be after those I believe.
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Colorize cell wont work

Post by TheCrow Tue 14 Oct 2014 - 17:57

The position:absolute for the second one took the image where the logo is. So i removed it and i set it where i wanted it to be to fix this. But i noticed that when i zoom in or out it moved from there it should be..
Now i have this code in the CSS:
Code:
tr.newpost { position:relative }
tr.newpost .newImg {margin-left: -759px;
margin-top: 6px!important;
}

and this in the java:
Code:
$(function() {$('tr.newpost').append('<img class="newImg" src="http://i39.servimg.com/u/f39/18/45/97/69/oo610.gif">')});
TheCrow
TheCrow
Manager
Manager

Male Posts : 6913
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Solved Re: Colorize cell wont work

Post by Ange Tuteur Tue 14 Oct 2014 - 18:01

weird, try replacing your CSS with this :
Code:
tr.newpost { position:relative !important }
tr.newpost .newImg {
  position:absolute;
  left:8px;
  top:0;
}

The first rule might need to be important, so the absolute children stay inside their parents.
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Colorize cell wont work

Post by TheCrow Tue 14 Oct 2014 - 18:05

i left it for you to see. Its at the top again.
TheCrow
TheCrow
Manager
Manager

Male Posts : 6913
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Solved Re: Colorize cell wont work

Post by Ange Tuteur Tue 14 Oct 2014 - 18:12

Try changing the script to :
Code:
$(function() {$('tr.newpost td.tcl').append('<img class="newImg" src="http://i39.servimg.com/u/f39/18/45/97/69/oo610.gif">')});

and the CSS to :
Code:
tr.newpost td.tcl { position:relative !important }
tr.newpost td.tcl .newImg {
  position:absolute;
  left:8px;
  top:0;
}
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Colorize cell wont work

Post by TheCrow Tue 14 Oct 2014 - 18:16

left:4px and it worked! Many many thanks!
Topic Solved! :rose:
TheCrow
TheCrow
Manager
Manager

Male Posts : 6913
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

Solved Re: Colorize cell wont work

Post by Ange Tuteur Tue 14 Oct 2014 - 18:24

You're welcome ^^

Topic archived

Have a great day Smile
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum