TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 282
  • Total: 282

[Block] Clan war points block : need idea's/help

Started by Heero, June 24, 2008, 05:01:39 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JPDeni

Ah. :)

Okay. As long as you're just copying the text on those lines, you can use this:


  echo '<tr>';
  echo '<td>' . $game_img . '</td>';
  echo '<td>' . $clan1_img . ' ' . $clan1_name . '</td>';
  echo '<td>' . $score . '</td>';
  echo '<td>' . $clan2_img . ' ' . $clan2_name . '</td>';
  echo '<td>' . $lines[4] . '</td>';
  echo '<td>' . $lines[5] . '</td>';
  echo '</tr>';

goofyfootejb


goofyfootejb

Hey I have another question regarding the war block but it is sort of on a different topic. First let me just say I love this block. It looks absolutely great!

I was wondering though if you'd know if there was anyway got get this to display where the News would at the top of the theme? I tried just putting the code in the normal place where you type the news but that didn't work. If you don't get what I mean I attached a picture of my forums showing where I am trying to get this to display.

http://phenomfive.lemonnades.org is my website.

JPDeni

You would need to talk to the theme designer. The code would go into your index.template.php file -- somewhere. I can't tell you where because I don't know anything about that theme. (I also don't "do" themes. ;) )

I'm glad it's working well for you, though.

goofyfootejb

Quote from: JPDeni on January 15, 2009, 02:37:18 AM
You would need to talk to the theme designer. The code would go into your index.template.php file -- somewhere. I can't tell you where because I don't know anything about that theme. (I also don't "do" themes. ;) )

I'm glad it's working well for you, though.

Thank you for the info!

Kimmen

Nice minty thing this one. I used this version of the code:

  echo '<tr>';
  echo '<td>' . $game_img . '</td>';
  echo '<td>' . $clan1_img . ' ' . $clan1_name . '</td>';
  echo '<td>' . $score . '</td>';
  echo '<td>' . $clan2_img . ' ' . $clan2_name . '</td>';
  echo '<td>' . $lines[4] . '</td>';
  echo '<td>' . $lines[5] . '</td>';
  echo '</tr>';


JPDeni, is it possible to make each event scroll? I have now 5 events listed, but i want them to scroll in a smaller box. I use upper block to display it now, and added a center to it, so it is in center, but is it possible that the box shows the size of 3 events and scrolls the next 10 events?

JPDeni

What do you mean by "scroll"? Do you want the whole thing to be continuously scrolling or do you want scroll bars in the block?

Kimmen

I want all events to scroll automatic, but the box need to be the same size as it is with 3 events displayed  :)

Edit: If you can make it pause for 2 sec for each event or make a pause when mouse is over it, that would also help, but is not heavily needed, only if it is possible i would like it.

JPDeni

I don't know how to make it pause for each event. This will make it pause when the mouse is over it. This is just borrowed code that I got from SMF for "who's online today."

Before the printout of the text, add


echo '

<style type="text/css">

#marqueecontainer{
position: relative;
width: 95%; /*marquee width */
height: 150px; /*marquee height */
overflow: hidden;
padding: 2px;
padding-left: 4px;
}

</style>

<script language="javascript" type="text/javascript">

/***********************************************
* Cross browser Marquee II- Ã,© Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

var delayb4scroll=1000 //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)
var marqueespeed=1
var pauseit=1 //Pause marquee onMousever (0=no. 1=yes)?

////NO NEED TO EDIT BELOW THIS LINE////////////

var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var actualheight=\'\'

function scrollmarquee(){
if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+8))
cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px"
else
cross_marquee.style.top=parseInt(marqueeheight)+8+"px"
}

function initializemarquee(){
cross_marquee=document.getElementById("vmarquee")
if(cross_marquee == null)
   return
cross_marquee.style.top=0
marqueeheight=document.getElementById("marqueecontainer").offsetHeight
actualheight=cross_marquee.offsetHeight
if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Opera or Netscape 7x, add scrollbars to scroll and exit
cross_marquee.style.height=marqueeheight+"px"
cross_marquee.style.overflow="scroll"
return
}
setTimeout(\'lefttime=setInterval("scrollmarquee()",30)\', delayb4scroll)
}

if (window.addEventListener)
window.addEventListener("load", initializemarquee, false)
else if (window.attachEvent)
window.attachEvent("onload", initializemarquee)
else if (document.getElementById)
window.onload=initializemarquee


</script>

<div id="marqueecontainer" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">
<div id="vmarquee" style="position: absolute; width: 98%;">
';


After the printout of the text, add


echo '
</div>
</div>
';


You may have to play around with the height in the line


height: 150px; /*marquee height */


to get it to the size you want.

Kimmen


This website is proudly hosted on Crocweb Cloud Website Hosting.