Adult Script Pro Community Forums

The forum is here for legacy reasons. No new posts will be created. User registration is disabled! If you have any questions, please email us or check https://www.adultscriptpro.com for more details!

You are not logged in.

#1 2014-07-16 01:02:12

Jacob
Member
Registered: 2014-05-15
Posts: 193

Tried customizing filter but broke the script

Hi,

I was wondering if someone can please fix this script up for me.

<?php defined('_VALID') or die('Restricted Access!'); ?>
	<div id="page">
		<div id="left" class="width-200">
			<div class="content-box">
				<div class="content-box-title"><?php echo __('top-10'); ?></div>
				<div class="content">
					<?php if ($this->popular): ?>
					<ul class="links">
					<?php foreach ($this->popular as $model):
						echo '<li><a href="',RELATIVE_URL,'/pornstar/',$model['slug'],'/" title="View ',e($model['name']),' bio!">',e($model['name']),'</a></li>';
					endforeach; ?>
					</ul>
					<?php else: ?>
					<div class="none"><?php echo __('no-popular'); ?></div>
					<?php endif; ?>
				</div>
			</div>
			<?php echo p('adv', 'pornstar-browse-left'); ?>
		</div>
		<div id="right" class="width-760">
			<div class="content-box">
				<div class="content">
					<div id="pornstar-nav">
						<ul>
							<li class="legend"><?php echo __('browse-title'); ?>:</li>
							<li><a href="<?php echo RELATIVE_URL; ?>/pornstar/"<?php if ($this->letter == 'all'): echo ' class="active"'; endif; ?> title="<?php echo __('all-help'),'">',__('all'); ?></a></li>
							<?php foreach ($this->letters as $letter): ?>
							<li><a href="<?php echo build_url('', 1, $letter); ?>"<?php if ($this->letter == $letter): echo ' class="active"'; endif; echo ' title="',__('letter-help', array($letter)),'">',strtoupper($letter); ?></a></li>
							<?php endforeach; ?>
						</ul>
					</div>
					<div class="clear"></div>
				</div>
			</div>
			<div class="content-box">
				<div class="content-box-title-left"><?php echo strtoupper($this->title); ?></div>
                                
                                
                                <div id="menu-pornstar">
	<ul id="menuTop" class="level1">
		
            <li><span class="heading"><?php echo __('recent'); ?><!--<span class="arrowFilters"></span>--></span>
                    
			<ul class="dropdown d1">
				<li><a href="<?php echo build_url('recent', 1, $this->letter),'"'; if ($this->order == 'recent'): echo ' class="active"'; endif; echo '>',__('recent'); ?></a> </li><!-- &middot; -->
                                                   <li><a href="<?php echo build_url('popular', 1, $this->letter),'"'; if ($this->order == 'popular'): echo ' class="active"'; endif; echo '>',__('popular'); ?></a> </li>
						<li><a href="<?php echo build_url('favorites', 1, $this->letter),'"'; if ($this->order == 'favorites'): echo ' class="active"'; endif; echo '>',__('most-favorites'); ?></a> </li>
						<li><a href="<?php echo build_url('rated', 1, $this->letter),'"'; if ($this->order == 'rated'): echo ' class="active"'; endif; echo '>',__('top-rated'); ?></a> </li>
						<li><a href="<?php echo build_url('discussed', 1, $this->letter),'"'; if ($this->order == 'discussed'): echo ' class="active"'; endif; echo '>',__('most-discussed'); ?></a></li> 
						<li><a href="<?php echo build_url('name', 1, $this->letter),'"'; if ($this->order == 'name'): echo ' class="active"'; endif; echo '>',__('alphabetically'); ?></a></li>
			</ul>
		</li>
		
		
		
	</ul>
</div>
                                
				<a href="<?php echo RELATIVE_URL; ?>/pornstar/rss/<?php echo $this->order; ?>/" class="rss"><img src="<?php echo TPL_REL; ?>/images/feed.png" alt="RSS Feed" border="0" /></a>
				<div class="content clear">
                                    
                                    
                                    
					<div class="content-menu">
                                           
                                            
                                            
                                               <!-- <ul class="onclick-menu-content">
                                                    
                                                <li><a href="<?php echo build_url('recent', 1, $this->letter),'"'; if ($this->order == 'recent'): echo ' class="active"'; endif; echo '>',__('recent'); ?></a> </li> &middot; 
                                                   <li><a href="<?php echo build_url('popular', 1, $this->letter),'"'; if ($this->order == 'popular'): echo ' class="active"'; endif; echo '>',__('popular'); ?></a> </li>
						<li><a href="<?php echo build_url('favorites', 1, $this->letter),'"'; if ($this->order == 'favorites'): echo ' class="active"'; endif; echo '>',__('most-favorites'); ?></a> </li>
						<li><a href="<?php echo build_url('rated', 1, $this->letter),'"'; if ($this->order == 'rated'): echo ' class="active"'; endif; echo '>',__('top-rated'); ?></a> </li>
						<li><a href="<?php echo build_url('discussed', 1, $this->letter),'"'; if ($this->order == 'discussed'): echo ' class="active"'; endif; echo '>',__('most-discussed'); ?></a></li> 
						<li><a href="<?php echo build_url('name', 1, $this->letter),'"'; if ($this->order == 'name'): echo ' class="active"'; endif; echo '>',__('alphabetically'); ?></a></li>
                                                </ul> -->
                                            
					</div>
					<?php if ($this->models): ?>
					<div class="content-info">
						<?php echo __('showing'),' <span>',$this->pagination['start_item'],'</span> ',__('to'),' <span>',$this->pagination['end_item'],'</span> ',__('of'),' <span>',$this->pagination['total_items'],'</span> ',__('pstars'); ?>!
					</div>
					<?php foreach ($this->models as $model): ?>
					<div id="pornstar-<?php echo $model['model_id']; ?>" class="pornstar">
						<a href="<?php echo RELATIVE_URL; ?>/pornstar/<?php echo $model['slug']; ?>/" title="View <?php echo e($model['name']); ?> bio!"><?php echo e($model['name']); ?></a><br />
						<a href="<?php echo RELATIVE_URL; ?>/pornstar/<?php echo $model['slug']; ?>/"><img src="<?php echo MODEL_URL,'/',$model['model_id'],'.',$model['ext']; ?>" alt="<?php echo e($model['name']); ?>" /></a>
						<span class="left"><?php echo __('videos'); ?>:</span>
						<span class="right"><?php echo $model['total_videos']; ?></span>
						<span class="left clear"><?php echo __('watches'); ?>:</span>
						<span class="right"><?php echo $model['total_views']; ?></span>
						<div class="clear"></div>
					</div>
					<?php endforeach; ?>
					<div class="clear-left"></div>
					<?php echo p('adv', 'pornstar-browse-bottom'); ?>
					<div class="pagination"><ul><?php echo p('pagination', $this->pagination, build_url($this->order, true, $this->letter)); ?></ul></div>
					<?php else: ?>
					<div class="none"><?php echo __('no-pornstars'); ?></div>
					<?php endif; ?>
				</div>
			</div>
		</div>
		<div class="clear"></div>
	</div>
<style type="text/css">
    #menu-pornstar {
    position: relative;
    z-index: 500;
    width: 125px;
    float: right;
}
#menu-pornstar ul {
    
    list-style: none outside none;
    margin: 0;
    padding: 5px;
}
#menu-pornstar ul.level1 {
    height: 30px;
}
#menu-pornstar ul ul {
    left: -9999px;
    position: absolute;
    top: 31px;
    width: 122px;
}

#menu-pornstar ul li {
    
    float: left;
    margin-right: 5px;
    position: relative;
    padding: 0px;
}
#menu-pornstar ul li .heading {
    width: 100px;
    -webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
font-weight: bold;
padding: 3px 1px 2px 5px !important;
    text-align: center;
}

#menu-pornstar ul li a, #menu-pornstar ul li .heading {
    -moz-border-bottom-colors: none;
    -moz-border-left-colors: none;
    -moz-border-right-colors: none;
    -moz-border-top-colors: none;
/*    background: none repeat scroll 0 0 #373737;*/
    color: #CCC;
    display: block;
    float: left;
    cursor: pointer;  
    padding: 8px 10px 8px 5px;
    text-decoration: none;
     background: #373737;
}

#menu-pornstar ul ul li {
    margin: 0;
}
#menu-pornstar ul ul li a {
    width: 105px;
    background-color: #151515;
    color: #CCC;
}
#menu-pornstar ul ul li a.fly {
    padding-right: 10px;
}
#menu-pornstar ul li:hover > a {
    background-color: #373737;
    color: #FFF;
}
#menu-pornstar ul li .heading:focus {
    outline: 0 none;
}
#menu-pornstar ul li .heading:active + ul.dropdown {
    left: -5px;
}
#menu-pornstar ul li .heading:focus + ul.d1{
    left: -5px;
}
#menu-pornstar ul li ul.dropdown:hover {
    left: -5px;
}
#menu-pornstar ul li .heading:active + ul.flyout {
    left: 122px;
}

#menu-pornstar ul li ul.flyout:hover {
    left: 122px;
}
.arrowFilters {
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #ec53e3;
    content: "";
    font-size: 0;
    height: 0;
    margin-left: 10px;
    position: relative;
    top: -1px;
    width: 0;
}
.pagination {
    margin-top: 40px;
}
    </style>
    <script type="text/javascript">
        $('.heading').click(function(){
            if($('.d1').css('left') == '-9999px') {
                $('.d1').css('left','-5px');
            } else {
                $('.d1').css('left','-9999px');
            }
        });
     $(".heading").mouseup(function() {
        return false
    });
    $(document).mouseup(function(e) {
        if($(e.target).parent(".heading").length==0) {
             $('.d1').css('left','-9999px');
        }
    });
    </script>

That's what I currently have in pornstar_browse.tpl.php. Link to website:

fuckturbate.net/pornstar

Problem: If I select a filter option from the dropdown, it doesn't provide the new results.

Offline

Board footer

Powered by FluxBB