TinyPortal
Development => Support => Topic started by: jtypecav on June 03, 2010, 03:51:38 PM
Hi again all. :)
Is there a way to create announcement posts or show an article in a block inside a particular message board. Kind of like a floating sticky?
This site is an example:
http://www.migweb.co.uk/forums/cars-sale/
Is there a way to make TP do anything like this inside a forum board / category? On the new site I am doing I am fed up having to remind people of the rules.
I know VB can do the small and large announcments like this: (This is not my site) Any way to do this (but SMF/TP style awesomeness) instead?
http://www.vauxhallownersnetwork.co.uk/forumdisplay.php?21-Cars-amp-Bikes-Forsale-Trade-or-P-X
Someone may have already provided a way of doing this via say articles, or an SMF2 option I am yet to find?
Both of these sites are not mine but hopefully there must be an equivalent way. A sticky just doesn't really seem to cut it these days!
jtypecav,
Sure, you can do this. If you will look at the Forum BoardIndex on my test site ...
http://talesofthehavenexpanse.com/smf2test/index.php?action=forum
... you will see 3 Boards in the General Category. If you click the "General Disscussion" Board, you will see a block in the top panel that is similar to what you are asking for. The title of the block is "Announcement". This is simply a "Single Article" Block which has been set to show while viewing that Board only. That block will show in no other location. The contents of the block itself is just an html article and can be seen at this link --> http://talesofthehavenexpanse.com/smf2test/index.php?page=2
If it's hard to see the actual article in the block, that's because I designed the article to be used on a dark theme. This link may allow you to see it better --> http://talesofthehavenexpanse.com/smf2test/index.php?board=1.0;theme=11
ZarPrime
I'd been so busy working on the database that the pure simplicity of this escaped me. Thank you for this! O0 :)
It DOES look clean and sophisticated too.
jtypecav,
I'm glad you liked it. TinyPortal makes it fairly easy to do stuff like this. Sometimes you just have to think about the best way to do it. Topic Solved. O0
ZarPrime
i hacked about with a similar thing for membership reminders.. still seems to work (smf 1.11.11 + TP 1.0b4).
using html+script box it puts a tp styled div, positioned absolutely (so on top of other stuff) with your message and a link to click that invisibilises that message.
visibility was set by membership group & where the block appeared.
<style type="text/css">
div#invisidiv
{
position: fixed;
top: 200px; right: 30%; left: 30%;
}
</style>
<script language="JavaScript">
// http://www.netlobo.com/div_hiding.html
function toggleLayer( whichLayer )
{
var elem, vis;
if( document.getElementById ) // this is the way the standards work
elem = document.getElementById( whichLayer );
else if( document.all ) // this is the way old msie versions work
elem = document.all[whichLayer];
else if( document.layers ) // this is the way nn4 works
elem = document.layers[whichLayer];
vis = elem.style;
// if the style.display value is blank we try to figure it out here
if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
vis.display = (vis.display==''||vis.display=='block')?'none':'block';
}
</script>
<div class="tborder tp_article_frame" id="invisidiv">
<div class="titlebg tp_subject">
BLOCK TITLE HERE
</div>
<div class="tp_articletext">
<center>
<p>
TEXT HERE
</p>
<p>
<a href="javascript:toggleLayer('invisidiv');">Click here to close.</a>
</p>
</center>
</div>
</div>
just another little idea.