MyBB Community Forums

Full Version: [Material] Display random text with Javascript
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
can show random text with the codes I give. Do not forget to decorate with Css! Big Grin

<style type="text/css"> 
  #QOD { font-weight: bold; font-size: 1.5em; color: #ff0000; } 
</style> 

<script type="text/javascript"> 
var QofD = new Array( 
  'Ben yakşuklu sen ne;? ankaralıyım bu arada bea.',  
  'Canım sıkıldı..', 
  'Hayat kağıt sen tuvalsin dostum.',
  'Tam ismim Ahmet,ahmet hakkı yenmiş biraz garip ismim var.', 
  'Rap dinliyon mu?', 
  'Yes.. goll!!! Galatasaraylıyım.', 
  'Dokunma bana! biz küstük!', 
''); 

function setQofD() { 
  var r = Math.floor(Math.random()*(QofD.length-1)); 
  document.getElementById('QOD').innerHTML = QofD[r]; 
} 
</script> 

</head> 
<body onLoad="setQofD()"> 
<strong>Ripbyrustavi02 :</strong> <span id="QOD"></span> 
<br /> 
</body> 
</html>
You do realise that this forum is for mybb theme development, not HTML development ?
(2017-01-16, 06:25 AM)d3xt3r Wrote: [ -> ]You do realise that this forum is for mybb theme development, not HTML development ?

I know there are those who can not write these codes, I just want to help them
(2017-01-16, 04:48 PM)Ripbyrustavi02 Wrote: [ -> ]
(2017-01-16, 06:25 AM)d3xt3r Wrote: [ -> ]You do realise that this forum is for mybb theme development, not HTML development ?

I know there are those who can not write these codes, I just want to help them

Try to post in Mybb Tutorials forum .
Yeah Well I dont see Display.template.php. I am using Dilber MC Theme On my Car site. How do I add this one?
(2017-01-17, 06:23 AM)yass100 Wrote: [ -> ]Yeah Well I dont see Display.template.php. I am using Dilber MC Theme On my Car site. How do I add this one?

Hi, you can use these codes to show a random text. If you add to the header template, you will get a great image when you decorate with CSS a bit!
(2017-01-17, 04:29 PM)Ripbyrustavi02 Wrote: [ -> ]
(2017-01-17, 06:23 AM)yass100 Wrote: [ -> ]Yeah Well I dont see Display.template.php. I am using Dilber MC Theme On my Car site. How do I add this one?

Hi, you can use these codes to show a random text. If you add to the header template, you will get a great image when you decorate with CSS a bit!

It's not quite as straight forward as that.

Please post this in the correct forum (of which this isn't)