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 2015-06-01 21:51:44

donronca
Member
From: The Netherlands
Registered: 2012-12-27
Posts: 317
Website

Add text in the search box

i was wondering how to modify

in the search box where now search is input,
change to : Search in +10,000 porn videos

and when it automaticly change to images that
Search through 8.800 Porn Pictures

and pornstar the same
and the rest.

greets

Offline

#2 2015-07-22 11:13:09

donronca
Member
From: The Netherlands
Registered: 2012-12-27
Posts: 317
Website

Re: Add text in the search box

anyone knows how to modify this?

Offline

#3 2015-07-22 16:21:05

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: Add text in the search box

Edit templates/yoru-template/header.tpl.php and find:

placeholder="<?php echo __('search'); ?>"

and replace with:

placeholder="whatever you want"

Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#4 2015-07-22 16:31:30

thiva7
Member
Registered: 2011-04-30
Posts: 1,022

Re: Add text in the search box

I think he mean automaticaly

when he choose photo in select to change text in text to "8.800 Porn Pictures" etc

Offline

#5 2015-07-22 20:30:21

donronca
Member
From: The Netherlands
Registered: 2012-12-27
Posts: 317
Website

Re: Add text in the search box

@thiva7. Exactly

Offline

#6 2015-07-23 05:45:32

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: Add text in the search box

It can be done, but via ajax and its not so simple, a lot of files need to be modified.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#7 2015-07-23 08:57:50

donronca
Member
From: The Netherlands
Registered: 2012-12-27
Posts: 317
Website

Re: Add text in the search box

maybe a nice feature for a new update in the future

Offline

#8 2015-07-23 10:48:23

thiva7
Member
Registered: 2011-04-30
Posts: 1,022

Re: Add text in the search box

This is what you want rigth

http://jsfiddle.net/b46v6trw/1/

this is very simple example of what u need.but in ASP is deferent to make it work since is not have simple select for search.
When i have time i will look at it more

Last edited by thiva7 (2015-07-23 10:49:16)

Offline

#9 2015-07-24 15:10:07

donronca
Member
From: The Netherlands
Registered: 2012-12-27
Posts: 317
Website

Re: Add text in the search box

yes that is what i want big_smile
thanks.

you're very helpfull to me
thanks for that

Offline

#10 2015-07-24 16:04:42

thiva7
Member
Registered: 2011-04-30
Posts: 1,022

Re: Add text in the search box

No problem... smile

Btw i think i made what u ask for

demo : http://dev.scriptdevel.com/

Let me know if is what you asking for smile

Thanks

Offline

#11 2015-07-25 10:06:01

donronca
Member
From: The Netherlands
Registered: 2012-12-27
Posts: 317
Website

Re: Add text in the search box

Nice.

That's it?

Offline

#12 2015-07-25 11:10:44

thiva7
Member
Registered: 2011-04-30
Posts: 1,022

Re: Add text in the search box

donronca wrote:

Nice.

That's it?

What you mean that's it?

Offline

#13 2015-07-26 12:01:27

donronca
Member
From: The Netherlands
Registered: 2012-12-27
Posts: 317
Website

Re: Add text in the search box

yes, that is what i need for the search bar

Offline

#14 2015-07-26 13:10:01

thiva7
Member
Registered: 2011-04-30
Posts: 1,022

Re: Add text in the search box

Ok

Open header.tpl.php of your theme

in Empty space add this

<script>
	 $(document).ready(function(){
		var $this = $(this);
	 	 $("li").click(function(){
       	 $("#search_text").val($(this).attr('id'));
   			 });
		});
	  </script>

In your search Input add this

id="search_text"

inside this

<ul class="dropdown-menu pull-right" role="menu">

</ul>

add id="" to each <li>

This id will be what text u want to show in
save and test smile

Offline

#15 2015-07-27 02:38:08

newxxx
Member
Registered: 2012-06-11
Posts: 702

Re: Add text in the search box

nice !!!!!

can that be updated as standard in future versions of the script ?

Offline

#16 2015-07-28 16:39:25

donronca
Member
From: The Netherlands
Registered: 2012-12-27
Posts: 317
Website

Re: Add text in the search box

i don't know how to modify it.
i'm trying but i think i add the

id="" to each <li>

not correctly

          					<ul class="dropdown-menu pull-right" role="menu" id="search_text">
          					    <li <?php if ($action == 'video'): echo ' class="active"'; endif; ?>><a href="#search-videos" id="" class="search-in-video"><i class="fa fa-video-camera"></i> Videos</a></li>
          						<?php if (VModule::enabled('photo')): ?><li<?php if ($action == 'photo'): echo ' class="active"'; endif; ?>><a href="#search-photo" id="" class="search-in-photo"><i class="fa fa-image"></i> Photos</a></li><?php endif; ?>
          						<?php if (VModule::enabled('pornstar')): ?><li<?php if ($action == 'pornstar'): echo ' class="active"'; endif; ?>><a href="#search-pornstar" id="" class="search-in-pornstar"><i class="fa fa-user"></i> Pornstars</a></li><?php endif; ?>
          						<?php if (VModule::enabled('forum')): ?><li<?php if ($action == 'forum'): echo ' class="active"'; endif; ?>><a href="#search-forum" id="" class="search-in-forum"><i class="fa fa-comments"></i> Forum</a></li><?php endif; ?>
          						<li<?php if ($action == 'community'): echo ' class="active"'; endif; ?>><a href="#search-users" id="" class="search-in-community"><i class="fa fa-user"></i> Users</a></li>
          					</ul>
          				</div>    	

Offline

#17 2015-07-28 16:49:19

thiva7
Member
Registered: 2011-04-30
Posts: 1,022

Re: Add text in the search box

U done it wrong.

<ul class="dropdown-menu pull-right" role="menu">  <--- dont add nothnig on this line
//here is your <li>
//example LI

<li<?php if ...................

make it
<li id="SOME TEST"<?php if
</ul><--- dont add nothnig on this line


So in each LI add ID with some text that u want to show msg

Offline

#18 2015-07-28 17:22:49

donronca
Member
From: The Netherlands
Registered: 2012-12-27
Posts: 317
Website

Re: Add text in the search box

like this?

			<div class="search">
				<?php $actions = array('video' => 'video-camera', 'photo' => 'camera', 'premium' => 'heart', 'community' => 'users', 'forum' => 'comments', 'pornstar' => 'file-image-o'); 
				if (isset($this->menu) && isset($actions[$this->menu])): $action = $this->menu; $icon = $actions[$this->menu]; else: $action = 'video'; $icon = 'video-camera'; endif; ?>
				<form id="search-form" method="get" action="<?php echo REL_URL,'/search/',$action; ?>/">
        			<button id="search" type="button" class="btn btn-default btn-lg pull-right btn-submit"><i class="fa fa-search"></i></button>
					<div class="input-group input-group-lg">
    					<input name="s" type="text" class="form-control" placeholder="<?php echo __('Search'); ?>" value="<?php if (isset($this->query) && $this->query): echo e($this->query); endif; ?>">
    					<div class="input-group-btn">
          					<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
          						<i id="search-icon" class="fa fa-<?php echo $icon; ?>"></i>
            					<span class="caret"></span>
            					<span class="sr-only">Toggle Dropdown</span>
          					</button>
          					<ul class="dropdown-menu pull-right" role="menu">
          					    <li id="SOME TEST"<?php if ($action == 'video'): echo ' class="active"'; endif; ?>><a href="#search-videos" id="" class="search-in-video"><i class="fa fa-video-camera"></i> Videos</a></li>
          						<?php if (VModule::enabled('photo')): ?><li id="SOME TEST"<?php if ($action == 'photo'): echo ' class="active"'; endif; ?>><a href="#search-photo"  class="search-in-photo"><i class="fa fa-image"></i> Photos</a></li><?php endif; ?>
          						<?php if (VModule::enabled('pornstar')): ?><li id="SOME TEST"<?php if ($action == 'pornstar'): echo ' class="active"'; endif; ?>><a href="#search-pornstar" id="" class="search-in-pornstar"><i class="fa fa-user"></i> Pornstars</a></li><?php endif; ?>
          						<?php if (VModule::enabled('forum')): ?><li id="SOME TEST"<?php if ($action == 'forum'): echo ' class="active"'; endif; ?>><a href="#search-forum" id="" class="search-in-forum"><i class="fa fa-comments"></i> Forum</a></li><?php endif; ?>
          						<li id="SOME TEST"<?php if ($action == 'community'): echo ' class="active"'; endif; ?>><a href="#search-users" id="" class="search-in-community"><i class="fa fa-user"></i> Users</a></li>
          					</ul>
          				</div>    								
        			</div>
				</form>

Offline

#19 2015-07-28 17:27:36

thiva7
Member
Registered: 2011-04-30
Posts: 1,022

Re: Add text in the search box

Yes just add the Id to search input

id="search_text"

And make test and let me know

Offline

#20 2015-08-15 15:07:46

donronca
Member
From: The Netherlands
Registered: 2012-12-27
Posts: 317
Website

Re: Add text in the search box

thanks it works . big_smile

Offline

#21 2015-08-15 15:49:24

thiva7
Member
Registered: 2011-04-30
Posts: 1,022

Re: Add text in the search box

donronca wrote:

thanks it works . big_smile


Nice smile

Offline

Board footer

Powered by FluxBB