CovertSphinx 710 Share Posted April 17, 2017 Once again, I'm working on my Jcink site. What I have set up, is that I modified the Forum Row html so that I could have the Board Name and description replaced by an image of my choosing; and select other information next to it. Essentially, below. Don't mind the mis-matched colors, this is the WIP skin The coding for the "Forum Row" editable is thus: <style> .newspaper { -webkit-column-count: 2; /* Chrome, Safari, Opera */ -moz-column-count: 2; /* Firefox */ column-count: 2; -webkit-column-gap: 40px; /* Chrome, Safari, Opera */ -moz-column-gap: 40px; /* Firefox */ column-gap: 40px; -webkit-column-rule-style: solid; /* Chrome, Safari, Opera */ -moz-column-rule-style: solid; /* Firefox */ column-rule-style: solid; } </style> <tr class='forum-row'> <td class="row2" width="100%"> <div class="newspaper"> <b><a class="tooltip" tooltip="<!-- |description_clean| -->" href="?showforum= <!-- |forum_id| --> " alt="<!-- |name| -->"><!-- |description| --></a></b><br><br> <span class='forum-led-by'> <!-- |subforums_list| --><br> Newest: <!-- |last_topic| --> By: <!-- |last_poster| --> On: <!-- |last_post| --></span></span> </td></div> </td> </tr> Now, here's where it gets tricky. Basically I have the name of the forum nixed and the image is being read from the Description field where you create/modify the forum. What I'm trying to do, is create a conditional statement that changes the image based upon what skin the user is, well, using. This is what I've entered so far (after hours of trying various modifications, as well as Java's conditional instead which I couldn't figure out either). <!--[if Skin_value=6]> <img src='http://files.jcink.net/uploads/onyxtreaty/BloodRose_Images/legendsrules.png'> <![endif]--> <!--[if Skin_value=6]> <img src='http://files.jcink.net/uploads/onyxtreaty/BloodRose_Images/legendsrules.png'> <![endif]--> Granted, utilizing the javascript conditional statement left me with it showing the default image no matter what modifications I made to it. Using the code above...it actually made the image disappear (Hence why there's an image missing in the photo). I THINK my main problem is that I can't seem to figure out how to make the code pull up the skin choice as a variable. I've tried by Skin Id; Skin Name; Skin Value, and written in multiple forms. Granted, I have very little idea what I'm doing and could be totally mucking up the conditional statements entirely. I just give up and need some extra eyes. Link to comment Share on other sites More sharing options...
Admin Morrigan 1,826 Admin Share Posted April 17, 2017 So skin value is not a thing however skin ID is one as you can see here: https://jcink.com/main/wiki/jfb-skinning-board-wrappers-advanced Try using this code instead of the one that you have up there: Quote <!-- |skin_id| --> @CovertSphinx Profile set made by myself and original Artwork by Fae Merriman, my daughter. Link to comment Share on other sites More sharing options...
CovertSphinx 710 Author Share Posted April 18, 2017 Unfortunately, that's not working either. Maybe there's a different code I'd have to use with it or something idk. Link to comment Share on other sites More sharing options...
Admin Morrigan 1,826 Admin Share Posted April 19, 2017 Alright @CovertSphinx I scoured the wiki and found that the if statement is wrong. You need to use javascript. It would look more like this. Quote <script> if("<!-- |skin_id| --> " == 6) { document.write('<img src="This would be the image" />'); } </script> I have tested and this does work (at least in the main skin bits). Profile set made by myself and original Artwork by Fae Merriman, my daughter. Link to comment Share on other sites More sharing options...
CovertSphinx 710 Author Share Posted April 22, 2017 (edited) Idk why, but I still cant' get it to work. Maybe I should be using the Javacode somewhere in the Stylesheet or board wrapper instead of the "description" field in the Forum editor? Other than trying that later when I have time, I think I might give up and just make "skin neutral" images just so that I don't annoy myself to death lol Thanks for the help though! Edited April 22, 2017 by CovertSphinx Link to comment Share on other sites More sharing options...
Admin Morrigan 1,826 Admin Share Posted April 23, 2017 If that doesn't work in the description then I wouldn't know how to do it short of doing a separate image host thing. Where you make the images all the same name and put them in separate skin named folders. The only thing I can ask is if you just put the code in the description does it work? @CovertSphinx Profile set made by myself and original Artwork by Fae Merriman, my daughter. Link to comment Share on other sites More sharing options...
CovertSphinx 710 Author Share Posted April 23, 2017 If I put just the <img src= code into the description field, it shows the image just fine. Whenever I try to add anything to establish the If X = This; it gives me a blank field regardless of how I tweak it. I believe my code in the "Forum Row" html editor explicitly draws directly from the <--description --> id, which is why I assumed to put the code in the Forum Description field in the regular forum modification page lol. Link to comment Share on other sites More sharing options...
Admin Morrigan 1,826 Admin Share Posted April 23, 2017 You could always just give it a div with an ID and set the background per skin. So the description is like: <div id="forum1"></div> #forum1 { height: IMGHEIGHTpx; width: IMGWIDTHpx; background: url(IMAGEURL); } And do that per forum per skin. Profile set made by myself and original Artwork by Fae Merriman, my daughter. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now