Link to home
Start Free TrialLog in
Avatar of DS928
DS928Flag for United States of America

asked on

Link Stopped Working

After I changed "News1" to "Spotlight1" the link stopped working.  I went through the code and changed News1 to Spotlight1 everywhere and created a Spotlight1.html as well.  If you click on the Jessica Jarrel banner you will see that it just goes nowhere.  the site is www.audiodigz.com  I went into inspect an element and it doesn't seem that the code is loading...
<div class="crsl-item">
 <a href="http://audiodigz.com/index.php?a=page&b=spotlight1" rel="loadpage">
<img src="http://www.audiodigz.com/Spotlight/JJCloser.png" srcset="images/JJCloser200.png 500w, images/JJCloser1000.png 1000w"/></a>
 </div>

Open in new window

page.php
ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DS928

ASKER

Hi Ray, All worked fine until I changed the name from news to spotlight.  My guess is that somewhere in this code it is not recognizing the new name and cannot build the page.  I did a search of the word "news" of the entire site and have changed them all to spotlight.  Still not opening the page.
Avatar of Jeff Darling
Where is the code for the parameter named b?  

http://audiodigz.com/index.php?a=page&b=news1

$_GET['b']

Open in new window

If not in the PHP, it could be javascript that is getting the b parameter and then deciding how to redirect.  The location of the b parameter may be the key to solving this.
Avatar of DS928

ASKER

OK after looking around here is the Get 'b' statement....
<?php
function PageMain() {
	global $TMPL, $LNG, $CONF, $db, $settings;
	
	$title = array( 'privacy'    => $LNG['privacy_policy'],
					'tos'		 => $LNG['terms_of_use'],
					'about'		 => $LNG['about'],
					'spotlight' => $LNG['spotlight'],
					'spotlight1' => $LNG['spotlight1'],
					'spotlight2' => $LNG['spotlight2'],
					'spotlight3' => $LNG['spotlight3'],
					'spotlight4' => $LNG['spotlight4'],
					'spotlight5' => $LNG['spotlight5'],
					'news' => $LNG['news'],
					'news1' => $LNG['news1'],
					'news2' => $LNG['news2'],
					'news3' => $LNG['news3'],
					'news4' => $LNG['news4'],
					'news5' => $LNG['news5'],
					'disclaimer' => $LNG['disclaimer'],
					'dmca' 		 => $LNG['dmca'],
					'contact'    => $LNG['contact'],
					'api'		 => $LNG['api_documentation']);
		
	$skin = new skin('page/sidebar'); $sidebar = '';
	foreach($title as $url => $header) {
		if($_GET['b'] == $url) {
			$TMPL['links'] .= '<div class="sidebar-link sidebar-link-active"><a href="'.$CONF['url'].'/index.php?a=page&b='.$url.'" rel="loadpage">'.$header.'</a></div>';
		} else {
			$TMPL['links'] .= '<div class="sidebar-link"><a href="'.$CONF['url'].'/index.php?a=page&b='.$url.'" rel="loadpage">'.$header.'</a></div>';
		}
	}
	$sidebar = $skin->make();
	
	if(!empty($_GET['b']) && isset($title[$_GET['b']])) {
		$b = $_GET['b'];
		
		$TMPL['sidebar'] = $sidebar;
		$TMPL['url'] = $CONF['url'];
		$TMPL['title'] = "{$title[$b]} - ".$settings['title'];
		$TMPL['header'] = $title[$b]; 
		$skin = new skin("page/$b");
		return $skin->make();
	} else {
		header("Location: ".$CONF['url']);
	}
}
?>

Open in new window

Avatar of DS928

ASKER

Solution found on page.php.  Missing

'spotlight' => $LNG['spotlight'],
					'spotlight1' => $LNG['spotlight1'],
					'spotlight2' => $LNG['spotlight2'],
					'spotlight3' => $LNG['spotlight3'],
					'spotlight4' => $LNG['spotlight4'],
					'spotlight5' => $LNG['spotlight5'],

Open in new window

Avatar of DS928

ASKER

It was on the page.php....Missing this

'spotlight' => $LNG['spotlight'],
                              'spotlight1' => $LNG['spotlight1'],
                              'spotlight2' => $LNG['spotlight2'],
                              'spotlight3' => $LNG['spotlight3'],
                              'spotlight4' => $LNG['spotlight4'],
                              'spotlight5' => $LNG['spotlight5'],