Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Image Changes when Page Refresh

Featured Replies

Basically I have two images and when someone refreshes my page I want it to change the only thing is Im not sure whether this is the right code and if so were would it go.

 

Ok Here are my two codes one is the code I have found and the other is what is in my sidebar.

 

Sidebar.php Code

<div class="span-8 last">



<br>
<a href="http://www.talkthereds.net/forums">
<input type="image" src="<?php bloginfo('template_directory'); ?>/images/forumbutton.png" alt="Forums" title= Enter Forums!" />
   <br>
<br>
   <a href="http://www.talkthereds.net/forums">
<input type="image" src="<?php bloginfo('template_directory'); ?>/images/stevengerrard.png" alt="Profiles" title= Players Profiles" />
   <br>
<br>
<a href="http://www.talkthereds.net/wallpaper/">
<input type="image" src="<?php bloginfo('template_directory'); ?>/images/wallpapers.png" alt="Wallpaper" title= Wallpapers" />

   <br>
<br>
<div class="facebookbox">
		<script type="text/javascript" src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_GB"></script><script type="text/javascript">FB.init("7faf22262fbb62c398295cd8d6e78393");</script><fb:fan profile_id="74024673413" stream="0" connections="12" logobar="0" height="320" width="245";> </fb:fan>
           <div style="font-size:8px;"><a href="http://www.facebook.com/pages/Liverpool/Talktheredsnet/74024673413"></a></div>

		</div>


<div class="sidebar">



       <?php if(get_theme_option('socialnetworks') != '') {
		?>
   			<div class="addthis_toolbox">   
   			    <div class="custom_images">

   			    </div>
   			    <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js?pub=xa-4a65e1d93cd75e94"></script>
   			</div>
   			<?php
   		}
   	?>

	<?php if(get_theme_option('ads_125') != '') {
		?>




	<?php } ?>

	<?php if(get_theme_option('video') != '') {
		?>

	<?php
	}
	?>
	<ul>
		<?php 
				if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>



		<?php endif; ?>
	</ul>
	<?php if(get_theme_option('ad_sidebar1_bottom') != '') {
	?>

	<?php
	}
	?>
</div>
</div>

 

 

 

JavaScript for the two Images

<script language="JavaScipt">

<!-- Begin
3rnd.today=new Date();
4rnd.seed=rnd.today.getTime();
5function rnd() {
6 rnd.seed = (rnd.seed*9301+49297) % 233280;
7 return rnd.seed/(233280.0);
8};
9
10function rand(number) {
11 var result = Math.ceil(rnd()*number);
12 if (!result)result++;
13 return result
14};
15
16var ad_cnt1 = 2;
17var ad1 = rand (ad_cnt1);
18var link1;
19var adBanner1;
20var width1
21var height1
22if (ad1==1) {
23link1="YOUR LINK HERE";
24adBanner1="IMAGE1.jpg";
25width1="304";
26height1="130"
27alt1="YOUR IMAGE NAME";
28}
29if (ad1==2) {
30link1="YOUR LINK HERE";
31adBanner1="IMAGE1.jpg";
32width1="304";
33height1="130";
34alt1="YOUR IMAGE NAME";
35}
36document.write('<a href="' + link1 + '" target="_top">');
37document.write('<img src="' + adBanner1 + '" width=' + width1 + ' height=' + height1 + ' border=0 alt="' + alt1 + '"></a>');
38document.write('');
39// End --> 

</scipt>

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.