Jump to content

Removing hyperlink


alireza

Recommended Posts

Hi,

heres my website

wwww.vidoox.com

i want to disable the hyperlink for categories ( on the left side) on my website and just have the hyperlink for subcategories, can any1 tell me how to do that,

so its basically like when you press the category it wont bring you anywhere it just opens the subcategories it has ( which it already is doing) i just need to remove the hyperlink of that heres the codes in the file i dont know where it is that i have to change/remove. please guide me through this

thanks

heres the code:

 

{include file='header.tpl'} 

<br />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="153" valign="top">
<div id="reg_box">
<h3>{$lang.genre}</h3>
	<div id="list_cats">
	<ul>
	{$list_categories}		
	</ul>
	</div>
</div>	
<div id="reg_box">
<h3>{$lang.members}</h3>
{if $logged_in == '1'}
{include file='loggedin_body.tpl'} 
{else}
{include file='login_body.tpl'} 
{/if}
</div>
{if ($show_tags == 1) && (count($tags) > 0)}
<div id="reg_box">
<h3>{$lang.tags}</h3>
<br />
{foreach from=$tags item=tag key=k}
	{$tag.href}
{/foreach}
</div>
{/if}
<br />
</td>
    <td width="738" valign="top">
<div id="browse_main">
<table width="100%" border="0" cellspacing="3" cellpadding="3">
      <tr>
        <td width="50%" valign="top"><h2>{$gv_category_name} Videos</h2></td>
        <td width="50%" valign="top">
	<div id="sorting">
	{$lang.sorting}: 
	<ul>		{if $smarty.const._SEOMOD == '1'}
	<li><a href="{$smarty.const._URL}/browse-{$gv_cat}-videos-{$gv_pagenumber}-date.html" rel="nofollow" class="{if $gv_sortby == 'date'}selectedli{/if}">{$lang.date}</a></li>
	<li><a href="{$smarty.const._URL}/browse-{$gv_cat}-videos-{$gv_pagenumber}-views.html" rel="nofollow" class="{if $gv_sortby == 'views'}selectedli{/if}">{$lang.views}</a></li>
	<li><a href="{$smarty.const._URL}/browse-{$gv_cat}-videos-{$gv_pagenumber}-rating.html" rel="nofollow" class="{if $gv_sortby == 'rating'}selectedli{/if}">{$lang.rating}</a></li>
	<li><a href="{$smarty.const._URL}/browse-{$gv_cat}-videos-{$gv_pagenumber}-artist.html" rel="nofollow" class="{if $gv_sortby == 'artist'}selectedli{/if}">{$lang.artist}</a></li>
	{else}
	<li><a href="{$smarty.const._URL}/category.php?cat={$gv_cat}&page={$gv_pagenumber}&sortby=date" rel="nofollow" class="{if $gv_sortby == 'date'}selectedli{/if}">{$lang.date}</a></li>
	<li><a href="{$smarty.const._URL}/category.php?cat={$gv_cat}&page={$gv_pagenumber}&sortby=views" rel="nofollow" class="{if $gv_sortby == 'views'}selectedli{/if}">{$lang.views}</a></li>
	<li><a href="{$smarty.const._URL}/category.php?cat={$gv_cat}&page={$gv_pagenumber}&sortby=rating" rel="nofollow" class="{if $gv_sortby == 'rating'}selectedli{/if}">{$lang.rating}</a></li>
	<li><a href="{$smarty.const._URL}/category.php?cat={$gv_cat}&page={$gv_pagenumber}&sortby=artist" rel="nofollow" class="{if $gv_sortby == 'artist'}selectedli{/if}">{$lang.artist}</a></li>
	{/if}
	</ul>
	</div>
	</td>
	</tr>
	<tr>
        <td colspan="2" valign="top">
	{if !empty($list_subcats)}	
	<div id="list_subcats">
	<h4>{$lang.related_cats}</h4>
	<ul>
	{$list_subcats}
	</ul>
	</div>
	{/if}
	</td>
        </tr>
    </table>
	<div id="browse_results">
	{$problem}
	<ul>
	{$results}
	</ul>
	</div>
	<table width="100%" border="0" cellspacing="2" cellpadding="2">
	  <tr>
		<td width="33%"><a href="{$smarty.const._URL}/rss.php?c={$cat_id}"><img src="{$smarty.const._URL}/templates/{$template_dir}/images/ico_rss_s.gif" alt="" border="0" width="16" height="16" align="absmiddle" /></a> <span class="pag">{$page_count_info}</span></td>
		<td width="33%" align="right">
			{$pagination}
		</td>
	  </tr>
	</table>
</div>
</td>
  </tr>
</table>
{include file='footer.tpl'} 

Link to comment
https://forums.phpfreaks.com/topic/186685-removing-hyperlink/
Share on other sites

      <div id="list_cats">
      <ul>
      {$list_categories}      
      </ul>
      </div>

 

My guess is that the event call is being attached dynamically to the element, for example with query:

 

$('#list_cats > a').click(...)

 

In order to suppress the normal anchor's action you can return false from the function.

Link to comment
https://forums.phpfreaks.com/topic/186685-removing-hyperlink/#findComment-985934
Share on other sites

      <div id="list_cats">
      <ul>
      {$list_categories}      
      </ul>
      </div>

 

My guess is that the event call is being attached dynamically to the element, for example with query:

 

$('#list_cats > a').click(...)

 

In order to suppress the normal anchor's action you can return false from the function.

 

could u be more specific about how i should make this change? im not good at this

Link to comment
https://forums.phpfreaks.com/topic/186685-removing-hyperlink/#findComment-985955
Share on other sites

I just realized you provided a link.

 

Within "js/general.js" look for the "catlist()" function. What you need to do is have the function return false ("return: false;"), in order to suppress the browser following the link. So you'll end up with roughly the following:

 

function catlist()
{
$("#ul_categories li").unbind('click').click(
 function(){
		var ul_subs = $(this).find('ul');

		if(ul_subs.hasClass("hidden_li"))
		{	
			ul_subs.removeClass();

			ul_subs.addClass('visible_li')
		}
		else if(ul_subs.hasClass("visible_li"))
		{
			ul_subs.addClass("hidden_li");	

			ul_subs.removeClass('visible_li');
		}
            
		return false;
 });
}

Link to comment
https://forums.phpfreaks.com/topic/186685-removing-hyperlink/#findComment-985964
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.