Attention:

Support Rules and Guidelines
Before you post your support topic, please remember to:
  • Read the support forum rules.
  • Check the wiki and use search to see if your problem can be answered there first.
  • Link your board please, and make sure that the problem on your board is visible to guests or provide a test account.
  • Do not post Board Wrappers and CSS unless requested. With a board link, this is not necessary.
  • Be as descriptive as you can and use as many details as possible when describing your problem.
  • Please briefly mark any links to forums that may not be work-safe.
This will help ensure your support issue will be attended to in a quick and efficient manner.

  ClosedNew TopicNew Poll

 Input showtopic variable [SOLVED]
#
I tried it out and it doesn't work. I figure if we have showforum and showuser we could get a showtopic too? Or was this already possible? I'm not sure.

I need this particular variable for code live previews such as miniprofiles so that it would only be true in a particular thread.
#
Your syntax is probably wrong somewhere.

<!-- |input_showtopic| --> works and is a valid wrapper variable where ?showtopic=xxx

How are you using it?

signature
email: admin@jcink.com :: blog: John C.
#
This is the code:

CODE
<script>if('<!-- |input_showtopic| -->' == '1') { document.write("<center> <img src='<!-- |field_4| -->' class='bigavatar'> <div class='miniprofile'> <div class='hoverprofile'> <div id='tabs_container'><ul id='tabs'><li class='active'> <a href='#<!-- |id| -->TAB1'> TAB1 TEXT</a></li><li><a href='#<!-- |id| -->TAB2'>TAB2 TEXT</a></li><li><a href='#<!-- |id| -->TAB3'>TAB3 TEXT</a></li</ul></div> <div id='tabs_content_container'><div id='<!-- |id| -->TAB1' class='tab_content' style='display: block'><!-- |avatar| --> TAB1'S CONTENT <!-- |field_1| --> </div> <div id='<!-- |id| -->TAB2' class='tab_content'> <!-- |field_2| --> </div> <div id='<!-- |id| -->TAB3' class='tab_content'><!-- |field_3| --> </div> </div> </div></div>  </center>");} </script>


using it so that when you're viewing the thread, that miniprofile would display. The miniprofile works (no linebreaks, single-quote, etc); tested it using id but it doesn't seem to like showtopic.

This post has been edited by AMB Tanz: Nov 8 2013, 01:55 AM
#
Ah.

Wrapper variables such as input do not work with mini profiles. Those are wrappers only.

This is on purpose because of performance reasons, so we won't be adding it as a feature.

But - solution here!

In your wrappers below <% JAVASCRIPT %> simply put this::

CODE
<script>var showtopic = '<!-- |input_showtopic| -->';</script>


Now you can use it like this in mini profiles:

if(showtopic == '1')

This sets a global javascript variable that can be used anywhere within the forum. So you should be good to go with that.

signature
email: admin@jcink.com :: blog: John C.
#
Oh of course. Board wrappers global variables http://img75.imageshack.us/img75/4283/smiliehu4.gif

But sweet. Works beautifully now. Didn't think of using it that way. Thanks! Learned something new.

This post has been edited by AMB Tanz: Nov 8 2013, 02:11 AM
#
Moved to JFB Support, please post topics like this here next time. Thanks. smile.gif

signature

user posted image
YouTube | Email: crystal@jcink.com | Blog: Seriously Lacqueing
DeviantArt
#
This topic has been solved. If you need anymore help please post a new thread. Thanks for choosing Jcink services.

signature

user posted image
YouTube | Email: crystal@jcink.com | Blog: Seriously Lacqueing
DeviantArt
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
Share this topic:
« Next Oldest | General Support | Next Newest »

Options ClosedNew TopicNew Poll