Jump to content

Archived

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

sheilahoff

PopThumb social icons

Recommended Posts

sheilahoff

I'm using Pop Thumb on this page http://stacey.hoffmangraphics.com/coaching/results/

 

The client wants the Tweet & FB social icons removed. I've tried to find them using Inspect Element and display: none but I haven't found them to remove them. Can someone possibly assist with a bit of CSS to remove them. I'm pretty sure there's no settings for this option within PopThumb.

 

Thanks,

Sheila


Sheila Hoffman | Hoffman Graphics | Seattle

Share this post


Link to post
Share on other sites
atcdomainsolutions

Hey Sheila! 

 

Long time!

 

You have to use the below for those and make sure to include "!important":

 

div.pp_default .pp_social {
margin-top: 7px;
display: none !important;
}

 

Share this post


Link to post
Share on other sites
sheilahoff

As always...you're a blessing. Thanks! That worked a treat.  You're in SD now? That's a big change.

 

Since you nailed this so easily maybe I can tap you for a non-DMS CSS question?! Although I'm not sure this can be handled in CSS. I use Time.ly Ai1EC. Their default listing includes USA and client wants that gone. Their settings are to either have an address or not. I've posted to them about removing the USA but so far no response. Here's an event where you see the USA: http://stacey.hoffmangraphics.com/event/jumpstart-september/?instance_id=109

 

If not....no worries. You were a HUGE help. Thank you!


Sheila Hoffman | Hoffman Graphics | Seattle

Share this post


Link to post
Share on other sites
atcdomainsolutions

As always...you're a blessing. Thanks! That worked a treat.  You're in SD now? That's a big change.

 

Since you nailed this so easily maybe I can tap you for a non-DMS CSS question?! Although I'm not sure this can be handled in CSS. I use Time.ly Ai1EC. Their default listing includes USA and client wants that gone. Their settings are to either have an address or not. I've posted to them about removing the USA but so far no response. Here's an event where you see the USA: http://stacey.hoffmangraphics.com/event/jumpstart-september/?instance_id=109

 

If not....no worries. You were a HUGE help. Thank you!

Just seeing this...yep, in SD for the next 11 months and then we'll be headed down to FL.  

 

Can you tell we love to travel?  Haha.  We both work from home so our goal was to be here for a short time (just over a year) and then head down to warm weather.

 

I'll take a look at the Calendar as I have used that on a lot of sites.

Share this post


Link to post
Share on other sites
atcdomainsolutions

As always...you're a blessing. Thanks! That worked a treat.  You're in SD now? That's a big change.

 

Since you nailed this so easily maybe I can tap you for a non-DMS CSS question?! Although I'm not sure this can be handled in CSS. I use Time.ly Ai1EC. Their default listing includes USA and client wants that gone. Their settings are to either have an address or not. I've posted to them about removing the USA but so far no response. Here's an event where you see the USA: http://stacey.hoffmangraphics.com/event/jumpstart-september/?instance_id=109

 

If not....no worries. You were a HUGE help. Thank you!

Sheila

 

Ok, I figured out how to do this BUT it will require you to edit code within the plugin file itself so not sure if you are comfortable with that.  I have the information you would need to copy OVER into the .php file.  These changes will be lost if there is a future update to the plugin of course but if you keep a backup of the NEW code I have pasted below, if an update is done, you can just go back to the location.php file and change it again. I changed two areas...removed the 'location' from the list of arrays and then add "null" to the if/else statement further down to NOT input anything for country.  

 

You would go to your root directory for the site and go through the "wp-content" folder and then "plugins" of course and then open up the "All In One Event Calendar" folder and then follow this path:

 

1.  Open the "app" folder

2.  Open the "View" folder

3.  Open the "Event" folder

 

The file you will edit is the "location.php" file....open it up (copy and save everything that is in there to a text file on your computer for backup purposes before changing) and then delete everything in it and replace with the below code and save.  Go back to the site and refresh and the Country should be gone.

 

 

 

<?php

 

/**

* This class renders the html for the event location.

*

* @author     Time.ly Network Inc.

* @since      2.0

*

* @package    AI1EC

* @subpackage AI1EC.View.Event

*/

class Ai1ec_View_Event_Location extends Ai1ec_Base {

/**

  * Return location details in brief format, separated by | characters.

  *

  * @return $string Short location string

  */

public function get_short_location( Ai1ec_Event $event ) {

  $location_items = array();

  foreach ( array( 'venue', 'city', 'province' ) as $field ) {

   if ( $event->get( $field ) !== '' ) {

    $location_items[] = $event->get( $field );

   }

  }

  return implode( ' | ', $location_items );

}

 

/*

  * Return any available location details separated by newlines

*/

public function get_location( Ai1ec_Event $event ) {

  $location = '';

  $venue    = $event->get( 'venue' );

  if ( $venue ) {

   $location .= $venue . "\n";

  }

  $address = $event->get( 'address' );

  if ( $address ) {

   $bits = explode( ',', $address );

   $bits = array_map( 'trim', $bits );

 

   // If more than three comma-separated values, treat first value as

   // the street address, last value as the country, and everything

   // in the middle as the city, state, etc.

   if ( count( $bits ) >= 3 ) {

    // Append the street address

    $street_address = array_shift( $bits ) . "\n";

    if ( $street_address ) {

     $location .= $street_address;

    }

    // Save the country for the last line

    $country = array_pop( $bits );

    // Append the middle bit(s) (filtering out any zero-length strings)

    $bits = array_filter( $bits, 'strval' );

    if ( $bits ) {

     $location .= join( ', ', $bits ) . "\n";

    }

    if ( $country ) {

     $location .= null. "\n";

    }

   } else {

    // There are two or less comma-separated values, so just append

    // them each on their own line (filtering out any zero-length strings)

    $bits      = array_filter( $bits, 'strval' );

    $location .= join( "\n", $bits );

   }

  }

  return $location;

}

/**

  * get_map_view function

  *

  * Returns HTML markup displaying a Google map of the given event, if the event

  * has show_map set to true. Returns a zero-length string otherwise.

  *

  * @return void

  **/

function get_map_view( Ai1ec_Event $event ) {

  $settings = $this->_registry->get( 'model.settings' );

  $loader = $this->_registry->get( 'theme.loader' );

  if( ! $event->get( 'show_map' ) ) {

   return '';

  }

 

  $location = $this->get_latlng( $event );

  if ( ! $location ) {

   $location = $event->get( 'address' );

  }

  $args = array(

   'address'                 => $location,

   'gmap_url_link'           => $this->get_gmap_url( $event, false ),

   'hide_maps_until_clicked' => $settings->get( 'hide_maps_until_clicked' ),

   'text_view_map'           => __( 'Click to view map', AI1EC_PLUGIN_NAME ),

   'text_full_map'           => __( 'View Full-Size Map', AI1EC_PLUGIN_NAME ),

  );

  return $loader->get_file( 'event-map.twig', $args, false )->get_content();

}

/**

  * Returns the latitude/longitude coordinates as a textual string

  * parsable by the Geocoder API.

  *

  * @param  Ai1ec_Event &$event The event to return data from

  *

  * @return string              The latitude & longitude string, or null

  */

public function get_latlng( Ai1ec_Event $event ) {

  // If the coordinates are set, use those, otherwise use the address.

  $location = NULL;

  // If the coordinates are set by hand use them.

  if ( $event->get( 'show_coordinates' ) ) {

   $longitude = floatval( $event->get( 'longitude' ) );

   $latitude  = floatval( $event->get( 'latitude' ) );

   $location  = $latitude . ',' . $longitude;

  }

  return $location;

}

/**

  * get_gmap_url function

  *

  * Returns the URL to the Google Map for the given event object.

  *

  * @param Ai1ec_Event $event  The event object to display a map for

  *

  * @return string

  **/

public function get_gmap_url( Ai1ec_Event $event ) {

  $loc = $this->_registry->get( 'p28n.wpml' );

  $location = $this->get_latlng( $event );

  if ( $location ) {

   $location .= $event->get( 'venue' ) ? '' : ' (' . $event->get( 'venue' ) . ')';

  } else {

   // Otherwise use the address

   $location = $event->get( 'address' );

  }

 

  $lang = $loc->get_language();

 

  return 'https://www.google.com/maps?f=q&hl=' . $lang .

  '&source=embed&q=' . urlencode( $location );

}

}

Share this post


Link to post
Share on other sites
atcdomainsolutions

To add to that (pasting didn't carry over the last part of the code)....at the bottom of the php code I attached, there is an area here at the very bottom:

 

 return 'https://www.google.c...om/maps?f=q&hl=' . $lang .

  '&source=embed&q=' . urlencode( $location );

}

}

 

 

The part in blue (link) got truncated but everything that is in between the "apostrophe should be what I have below...you'll probably need to copy this in AFTER you paste the code into the php file:

 

https://www  DOT   google   DOT   com/maps?f=q&hl=

 

(replace where I have DOT with the actual dot...like a normal url path...the forum keeps messing it up since it sees it as a link)

 

 

Share this post


Link to post
Share on other sites
sheilahoff

Got it...thanks. I've done a tiny bit of this sort of thing before. Ai1EC updates often though so this might be a PITA. I'll see if I can make a custom theme folder that it would draw this from. I really appreciate this. I'll let you know when (IF) I do this and how it goes.


Sheila Hoffman | Hoffman Graphics | Seattle

Share this post


Link to post
Share on other sites

  • Similar Content

    • Lisa Haran
      By Lisa Haran+
      Hi 
      I have a map here http://www.iloveoffset.com/maps/
      I want to add several pointer locations to the map, but when I do they do not appear.
      On this map there are 2 pointer locations and as you can there is only one visible.
      Earlier today I added 7 and could only see 4 so there is something odd going on.
      My theme is up to date
    • clj182
      By clj182+
      Hello,
      I've been having trouble unlocking the template section for past couple of weeks. When I try clicking nothing happens. 
      I've deleted my custom css and removed plugins. Im down to having only the following plugins:
      Akismet
      Contact Form 7
      DMS Professional Tools
      Pagelines Updater
      WooCommerce
      It was working fine before i have no idea what's going on with it.
    • flourishdesignstudio
      By flourishdesignstudio+
      My DMS 2 site http://www.heart-stone.com/ will not save any new custom css... I can still edit templates and publish those but any custom css that I enter never saves.
      All WP files, themes, and plugins are up to date. 
      Any thought about what might be causing this?
    • flourishdesignstudio
      By flourishdesignstudio+
      Is there a way to edit the custom CSS via FTP? I know I can edit the custom code in the Chrome editor but is there a file path I can use to find and edit the CSS directly from our FTP?
      Thanks in advance for the help!
    • nizami
      By nizami+
      Using navbar section with correctly configured WP menu to display main navigation at https://elenaangel.com. 
      All fine in desktop viewport. Menu displays twice in hamburger mode. How to fix this please? 

×