Page 1 of 3 123 LastLast
Results 1 to 10 of 29

Thread: Change tabs in ad-widget (vers. 3.1.8)

  1. #1
    Thread Starter
    samcy's Avatar
    Join Date
    Mar 2012
    Location
    Germany
    Posts
    12,098
    Thanks
    121
    Thanked 1,756 Times in 1,442 Posts

    Lightbulb Change tabs in ad-widget (vers. 3.1.8)

    The original widget inside an ad shows: Map | Contact | Poster

    The goal of this tutorial is to show it this way: Contact | Poster | Map Tested for Classipress Version 3.1.8. and a thanks to rubencio who made this changes for the previous versions. Please see the following screenshot:

    [CENTER]contactfirst.jpg[/CENTER]

    To get this done, we need to change 2 files:

    /wp-content/themes/classipress/sidebar-ad.php
    /wp-content/themes/classipress/includes/sidebar-gmap.php

    First, make a backup of thoose 2 files! Done? Ok, lets start:

    1.)
    Open the sidebar-ad.php and find the following code (starts at line 19)

    PHP Code:
            <ul class="tabnavig">
              <?php if ( $gmap_active ) { ?>
                  <li><a href="#priceblock1"><span class="big"><?php _e('Map''appthemes'?></span></a></li>
              <?php ?>
              <li><a href="#priceblock2"><span class="big"><?php _e('Contact''appthemes'?></span></a></li>
              <li><a href="#priceblock3"><span class="big"><?php _e('Poster''appthemes'?></span></a></li>
            </ul>
    Replace the above code with the following code:

    PHP Code:
    <ul class="tabnavig">
    <li><a href="#priceblock2"><span class="big"><?php _e('Contact''appthemes'?></span></a></li>
    <li><a href="#priceblock3"><span class="big"><?php _e('Poster''appthemes'?></span></a></li>
    <?php if ( $gmap_active ) { ?>
    <li><a href="#priceblock1"><span class="big"><?php _e('Map''appthemes'?></span></a></li>
    <?php ?>
    </ul>
    Now go down to the last line and add the following code under the last line:

    PHP Code:
    <script>
    jQuery(document).ready(function() {
        
    jQuery ('a[href=#priceblock1]').click(function(){
        
    jQuery ('#map').hide();
        
    load ();
        
    jQuery ('#map').fadeIn(500);
        
    codeAddress ();
        
    google.maps.event.trigger(map'resize');
        });
    });
    </script> 
    Save the file.

    __________________________________________________ __________________________________________________

    2.)
    Open the sidebar-gmap.php (inside the /includes folder) and find the following code (line 21)

    PHP Code:
    <?php
    // Google map on single page
    function cp_google_maps_js() {
    ?>
     <script type="text/javascript">
    //<![CDATA[
        jQuery(document).ready(function($) {
            $('#map').hide();
            load();
            $('#map').fadeIn(1000)
            codeAddress();
        });
    Replace the above code with the following:

    PHP Code:
    <?php
    // Google map on single page
    function cp_google_maps_js() {
    ?>
     <script type="text/javascript">
    //<![CDATA[
    //    jQuery(document).ready(function($) {
    //        $('#map').hide();
    //        load();
    //        $('#map').fadeIn(1000)
    //        codeAddress();
    //    });

    map = null;
    Save the file.

    __________________________________________________ ________________________________________________


    3.)
    Enjoy and drink a beer

    If you have a question or problem, please write here.

    Greets

  2. The Following 15 Users Say Thank You to samcy For This Useful Post:

    adrlog (August 9th, 2012), ajamm (May 7th, 2012), dismacoa (April 21st, 2012), eaport (April 23rd, 2012), getliveads (April 7th, 2013), gyver (January 30th, 2014), helmuc (May 14th, 2012), knova15 (April 12th, 2012), krreddy (August 1st, 2012), lucrothe (March 31st, 2012), mzaha (January 28th, 2013), Orzdy (November 4th, 2012), richard168 (September 3rd, 2012), shankalot (September 15th, 2012), timchr (April 21st, 2012)

  3. #2
    Veteran ajamm's Avatar
    Join Date
    Nov 2011
    Location
    New Zealand
    Posts
    309
    Thanks
    26
    Thanked 32 Times in 29 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  4. The Following User Says Thank You to ajamm For This Useful Post:

    consignor (March 18th, 2013)

  5. #3
    dismacoa's Avatar
    Join Date
    Apr 2012
    Location
    Mexico
    Posts
    120
    Thanks
    17
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  6. #4
    Junior Member eaport's Avatar
    Join Date
    Mar 2012
    Posts
    48
    Thanks
    32
    Thanked 1 Time in 1 Post
    You must be an AppThemes customer and logged in to view this response. Join today!

  7. #5
    Veteran ajamm's Avatar
    Join Date
    Nov 2011
    Location
    New Zealand
    Posts
    309
    Thanks
    26
    Thanked 32 Times in 29 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  8. #6
    Community Partner scarstens's Avatar
    Join Date
    Apr 2010
    Location
    Cave Creek, AZ USA
    Posts
    912
    Thanks
    2
    Thanked 129 Times in 86 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    ~ Seth Carstens, Sethmatics Inc.


  9. The Following User Says Thank You to scarstens For This Useful Post:

    samcy (May 7th, 2012)

  10. #7
    Thread Starter
    samcy's Avatar
    Join Date
    Mar 2012
    Location
    Germany
    Posts
    12,098
    Thanks
    121
    Thanked 1,756 Times in 1,442 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Rolf Hassel (Samcy)

  11. #8
    Veteran helmuc's Avatar
    Join Date
    Jan 2011
    Location
    Maidstone, UK
    Posts
    412
    Thanks
    119
    Thanked 47 Times in 43 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!


    🇬🇧 Helmuts | My ClassiPress hobby site: Outlived Classifieds: https://www.outlived.co.uk

    ❤️ $2.49 / £1.99 - 100GB Space, 1 TB Traffic, Unlimited Domains, Daily Backups, Free SSL Certificates > SSD Cloud Hosting > HostMaria.com

  12. #9
    Community Partner scarstens's Avatar
    Join Date
    Apr 2010
    Location
    Cave Creek, AZ USA
    Posts
    912
    Thanks
    2
    Thanked 129 Times in 86 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    ~ Seth Carstens, Sethmatics Inc.


  13. #10
    Senior Member krreddy's Avatar
    Join Date
    Mar 2011
    Location
    India
    Posts
    206
    Thanks
    15
    Thanked 1 Time in 1 Post
    You must be an AppThemes customer and logged in to view this response. Join today!

Page 1 of 3 123 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [TUTORIAL] Change the width ratio between Listings and Widgets (vers. 3.1.8)
    By samcy in forum ClassiPress General Discussion
    Replies: 5
    Last Post: January 14th, 2013, 01:26 AM
  2. [TUTORIAL] Show tabs: Just listed | Featured | Popular | Categories (vers. 3.1.8)
    By samcy in forum ClassiPress General Discussion
    Replies: 13
    Last Post: July 25th, 2012, 01:29 PM
  3. Change position of tabs in Ad
    By bseaborn in forum ClassiPress General Discussion
    Replies: 13
    Last Post: May 17th, 2012, 05:14 AM
  4. Tabs for RSS widget
    By gregrichters in forum JobRoller General Discussion
    Replies: 1
    Last Post: May 29th, 2011, 07:30 AM
  5. Editing the width of widget tabs?
    By homme143 in forum ClassiPress General Discussion
    Replies: 9
    Last Post: April 8th, 2011, 01:43 AM