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 2011-05-11 19:25:50

asko
Member
Registered: 2011-05-11
Posts: 138

Using a different index page?

I have a site with many pages and all i want is to do add a search box on my existing site connected to pages of adultscriptpro for video search results.

Is it possible to have the search form on my site send query to adultscriptpro search and get adultscriptpro result pages.

That is the only reason i want to use this script, to have a video search section. I would not keep anythin else beside mobile options.
(I  am trying to build my template into fontpage&header but it would be way easier the way i am asking i think)

Offline

#2 2011-05-11 19:31:00

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

Re: Using a different index page?

You can copy the form on your page (and a small javascript code) and when you search something it will redirect to the where the script is installed and show the results.


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

Offline

#3 2011-05-12 08:41:32

asko
Member
Registered: 2011-05-11
Posts: 138

Re: Using a different index page?

Can you please tell me this code?

Offline

#4 2011-05-12 09:21:53

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

Re: Using a different index page?

The code is:

                <div id="search">
                        <form id="search-form" method="get" action="http://www.domainwhereasproisinstalled.com/search/video/">
                                <input name="s" type="text" id="search-query" class="query" value="<?php if (isset($this->query)): echo e($this->query); endif; ?>" />
                                <input type="submit" id="search-submit" class="go" value="GO" />
                        </form>
                </div>

The javascript code:

   $("input[id='search_query']").keypress(function(e) {
        e.preventDefault();
    
        if (e.which == 13) {
            var query   = $("input[id='search-query']").val().replace(/\ /g, '-');
            if (query != '') {
                query = query + '/';
            }
            
            window.location = 'http://www.whereasproisinstalled.com/search/video/' + query;
        }
    });

    $("input[id='search-submit']").click(function(e) {
        e.preventDefault();
            
        var query   = $("input[id='search-query']").val().replace(/\ /g, '-');
        if (query != '') {
            query = query + '/';
        }
        
        window.location = 'http://www.whereasproisinstalled.com/search/video/' + query;
    });

You will also need jquery on your site and if you want the same look, you need to copy the css rules for the search box.


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

Offline

#5 2011-05-12 15:43:47

asko
Member
Registered: 2011-05-11
Posts: 138

Re: Using a different index page?

Is there a way i am supposed to have my site index.php in relation to proscript files?
Dropping in this new index.php instead of the default index.html & index.php in root folder is not working.



Do i have to put that code in like this?

<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo TPL_REL; ?>/js/jquery-1.5.2.min.js"></script>
</head>

<body>
<script type="text/javascript">
     
    CODE HERE

</script>

<div id="search">
...                 
</form>
</div>

</body>

Last edited by asko (2011-05-12 17:02:01)

Offline

#6 2011-05-12 17:43:14

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

Re: Using a different index page?

Hi,

I do not know how your scripts work, so i cannot answer which path will work sad If you use a absolute path for the urls, then it will work from any path.

1. You have a duplicate <script> for jquery. You only need one.
2. CODE HERE = the javascript used by the search form.
3. <div id="search">the form for the search</div>


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

Offline

#7 2011-05-14 07:40:51

asko
Member
Registered: 2011-05-11
Posts: 138

Re: Using a different index page?

Its working only when i remove the      value="<?php if (isset($this->query)): echo e($this->query); endif; ?>" /> in the form input

When i leave this php code the form doesn't show and page source is only rendered to code right before this php code.

?

Offline

#8 2011-05-14 07:58:18

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

Re: Using a different index page?

Then remove it. Its because you are not in a class anymore.


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

Offline

#9 2011-05-14 15:08:36

asko
Member
Registered: 2011-05-11
Posts: 138

Re: Using a different index page?

Thank you

should i have something else than an empty value=""     ?

Offline

#10 2011-05-14 15:24:38

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

Re: Using a different index page?

It depends on what you want.


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

Offline

Board footer

Powered by FluxBB