Jump to content

Another Wierd One


Recommended Posts

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

58f412c5ba36e_skinlayout.thumb.jpg.c2ddc5c6b2fe6cad83e13abdbec20aeb.jpg

 

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.

 

OnyxSiggy1.jpg.c76f2c1acc64a865bdf5164f4c085020.jpg

Link to comment
Share on other sites

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

  • Admin

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

0_mainsignature.jpg

image.png

Profile set made by myself and original Artwork by Fae Merriman, my daughter.

 

 

Link to comment
Share on other sites

Unfortunately, that's not working either. Maybe there's a different code I'd have to use with it or something idk.

 

OnyxSiggy1.jpg.c76f2c1acc64a865bdf5164f4c085020.jpg

Link to comment
Share on other sites

  • Admin

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).

0_mainsignature.jpg

image.png

Profile set made by myself and original Artwork by Fae Merriman, my daughter.

 

 

Link to comment
Share on other sites

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 by CovertSphinx

 

OnyxSiggy1.jpg.c76f2c1acc64a865bdf5164f4c085020.jpg

Link to comment
Share on other sites

  • Admin

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

0_mainsignature.jpg

image.png

Profile set made by myself and original Artwork by Fae Merriman, my daughter.

 

 

Link to comment
Share on other sites

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.

 

OnyxSiggy1.jpg.c76f2c1acc64a865bdf5164f4c085020.jpg

Link to comment
Share on other sites

  • Admin

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.

0_mainsignature.jpg

image.png

Profile set made by myself and original Artwork by Fae Merriman, my daughter.

 

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use, Guidelines and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.