Forum Replies Created

Viewing 15 replies - 76 through 90 (of 126 total)
  • No problem at all, I’m happy that I could help!

    @kpahl11: Your theme sets .menu styles around line 101. It sets the z-index to 50. Change that to 101.

    The original line:

    .menu { position: relative; list-style: none; z-index: 50; }

    The changed line:

    .menu { position: relative; list-style: none; z-index: 101; }

    Hehe, sorry about that, my link turned out to just be the period at the end. That’s the topic I was talking about.

    Lightbox Gallery: Caption Overlapping “Image X/Y”

    Happy to help!

    The split-second transition is gone for me, looks perfect! Tried it in the latest version of Chrome and in IE9. Older browsers may be different. I’m not familiar with superfish and it’s height setting, there may be another option that works. I stumbled on to that setting when I did a quick search on superfish menus.

    Perfect! After looking at the links you gave the Platform theme guys, I see that this theme actually uses z-index quite often. The culprit is actually the #header .outline z-index, which was set to 28 and wraps all of the header and navigation. So no matter what z-index you use for the menu or sub-menu, unless you move the slider down below 27 or the header outline above 99, it wouldn’t work.

    Also, just for clarification, Rob was incorrect in saying, “You’re making the z-index number higher, which sends things further back. Lower the number to bring things forward…” You were correct, “the lower z-index is, the further back the element will show.”

    I’m surprised these guys do not know their own code that well and couldn’t figure it out. It took me just a few minutes. Here is the code that should fix this:

    #header .outline {
        z-index: 101;
    }

    Also, if you want to remove the fade transition, which shows the background text through the sub-menu for a split second, there is a line in the header.php, in the head of the html, that looks like this:

    jQuery('ul.sf-menu').superfish({ delay: 100, speed: 'fast', autoArrows:  1, dropShadows: 0 });

    …change it to include an animation setting like this:

    jQuery('ul.sf-menu').superfish({ delay: 100, speed: 'fast', animation: { height:'show' }, autoArrows:  1, dropShadows: 0 });

    Hi mloga94, can you paste the code you put in your functions.php? You could also paste your current functions.php content on pastebin.com and link to it here.

    If you have made no other changes to the functions.php, it might be easiest to upload the original functions.php from the theme download. That should get the wp-admin area running again and then we can figure out the other problems.

    If you have made no other changes to any of the theme files, you could also follow linkfr’s advice from the other thread – delete the theme folder through your host’s file manager and re-install the theme. Most of your theme settings should be restored, but check the Menus and Widgets because Menus get reset and Widgets are stored in the Inactive Widgets section of the Widgets page.

    You probably need to set the position:relative and z-index for both the menu and the slider, with the slider z-index set to 10 and the menu z-index set to 101. Post a link and I will take a look.

    Based on the code you posted, I do not see where the identifiant class is used, but this might work:

    .main_nav {
    position:relative;
    z-index:101;
    }
    .promo_slider_wrapper {
    position:relative;
    z-index:10;
    }

    But again, I’m not using this plugin, so I can’t be sure. You may not even need the slider settings if it’s default z-index is less than 101.

    @mloga64, like I said on the other topic, you should create a new topic to get the best help. It gets confusing when we are tackling two separate and unrelated problems in the same context.

    That being said, the other thread didn’t say anything about putting code in the functions.php. Not sure where you got that from (and again, start a new thread and maybe we can get this figured out). You will probably need to re-upload your theme’s original functions.php (or show us the code and changes).

    EDITED

    Hi linkfr, I didn’t read everything here, just following mloga94. In the code you posted, try changing the number 10 to 101, like so:

    .identifiant{
      position:relative;
      z-index:101;
    }

    I’m not sure if this will work, I didn’t look in to this at all, just pieced it together from whats been said. I’m just here because mloga also posted on another unrelated topic I’m following, and I was looking to see if he had started a new topic anywhere and found this topic.

    @mloga94, please start a new topic so we don’t interfere with other unrelated questions. I’ve replied on the other topic I’m following.

    I see, interesting. The only reason I thought it was specific to the_content is because the plugin I’m using also runs apply_filters on the_excerpt and this doesn’t cause a problem.

    Don’t want to hijack the thread, but here is some more info on these [raw] tags, I’d like to figure out what is going on, maybe we can develop a work-around.

    Code posted here: https://www.wprecipes.com/disable-wordpress-automatic-formatting-on-posts-using-a-shortcode
    Based on a plugin here: https://www.ads-software.com/support/topic/plugin-remove-wpautop-wptexturize-with-a-shortcode?replies=8
    Issues discussed here: https://theandystratton.com/2011/shortcode-autoformatting-html-with-paragraphs-and-line-breaks

    Chris

    (@web2guru)

    I know this is an older topic, but I feel the need to jump in here. This is probably not a problem with the plugin – my opinion is that this is a problem with the theme. Other plugins can cause the theme to have the same issues with [raw] tags showing up around all their shortcodes.

    In my case, the plugin I have installed shows a post’s content using a shortcode, and during this process it runs apply_filters on the_content, which seems to be the issue. The theme’s [raw] tags are implemented using a filter and applying it to the_content. For some reason they do not like it when other plugins run apply_filters on the_content.

    I’m still looking for a solution. Right now I am using an if(is_page()) code to remove the raw filters on specific pages and have replaced the theme shortcodes on those pages with the html they output (mainly [hr_shadow]), but this is a messy solution and has its drawbacks.

    @micah
    Does the promotion slider plugin run apply_filters on the_content anywhere? If so, is their any chance of understanding what causes this incompatibility?

    Here is how they implement their raw tags:

    function my_formatter($content) {
      $new_content = '';
      $pattern_full = '{(\[raw\].*?\[/raw\])}is';
      $pattern_contents = '{\[raw\](.*?)\[/raw\]}is';
      $pieces = preg_split($pattern_full, $content, -1, PREG_SPLIT_DELIM_CAPTURE);
    
      foreach ($pieces as $piece) {
        if (preg_match($pattern_contents, $piece, $matches)) {
           $new_content .= $matches[1];
        } else {
           $new_content .= wptexturize(wpautop($piece));
        }
      }
    
      return $new_content;
    }
    
    remove_filter('the_content', 'wpautop');
    remove_filter('the_content', 'wptexturize');
    add_filter('the_content', 'my_formatter', 99);

    Chris

    (@web2guru)

    That is correct, spaces or not, it works with the code changes.

    Now if I can get it working in excerpts, I will be happy!

    Chris

    (@web2guru)

    The code is not very well tabbed to be easy to read, here is a reformatted version, with /*MOD*/ indicators tabbed further out too:

    if($options['customkey_preventduplicatelink'] == TRUE) {  //Prevent duplicate links for grouped custom keywords
    
    	$line = trim($line);
    	$lastDelimiterPos=strrpos($line, ',');
    	$url = trim(substr($line, $lastDelimiterPos + 1 )); 			/*MOD*/
    	$keywords = substr($line, 0, $lastDelimiterPos);
    	$keywords = str_replace(', ', ',', $keywords); 				/*MOD*/
    
    	if(!empty($keywords) && !empty($url)){
    		$kw_array[$keywords] = $url;
    	}
    
    	$keywords='';
    	$url='';
    
    } else {  //Old custom keywords behaviour
    
    	$chunks = array_map('trim', explode(",", $line));
    	$total_chuncks = count($chunks);
    	if($total_chuncks > 2) {
    		$i = 0;
    		$url = trim($chunks[$total_chuncks-1]); 			/*MOD*/
    		while($i < $total_chuncks-1) {
    			if (!empty($chunks[$i])) $kw_array[$chunks[$i]] = $url;
    			$i++;
    		}
    	} else {
    		list($keyword, $url) = array_map('trim', explode(",", $line, 2));
    		$keywords = str_replace(', ', ',', $keywords); 			/*MOD*/
    		if (!empty($keyword)) $kw_array[$keyword] = $url;
    	}
    
    }
    Chris

    (@web2guru)

    In seo-links.php, starting at line 145 there is an if-else block inside a foreach loop that builds the array that holds the keywords and their respective urls. Add a couple of trim and str_replace functions to get things working properly, four of them as shown below, marked by the /*MOD*/ comments at the end of the lines:

    if($options['customkey_preventduplicatelink'] == TRUE) {  //Prevent duplicate links for grouped custom keywords
    
    				$line = trim($line);
    				$lastDelimiterPos=strrpos($line, ',');
    				$url = trim(substr($line, $lastDelimiterPos + 1 )); /*MOD*/
    				$keywords = substr($line, 0, $lastDelimiterPos);
    				$keywords = str_replace(', ', ',', $keywords); /*MOD*/
    
    				if(!empty($keywords) && !empty($url)){
    					$kw_array[$keywords] = $url;
    				}
    
    				$keywords='';
    				$url='';
    
    			} else {  //Old custom keywords behaviour
    
    			$chunks = array_map('trim', explode(",", $line));
    			$total_chuncks = count($chunks);
    			if($total_chuncks > 2) {
    				$i = 0;
    				$url = trim($chunks[$total_chuncks-1]); /*MOD*/
    				while($i < $total_chuncks-1) {
    					if (!empty($chunks[$i])) $kw_array[$chunks[$i]] = $url;
    						$i++;
    					}
    				} else {
    					list($keyword, $url) = array_map('trim', explode(",", $line, 2));
    					$keywords = str_replace(', ', ',', $keywords); /*MOD*/
    					if (!empty($keyword)) $kw_array[$keyword] = $url;
    				}
    
    			}

    I’m not positive the last two are needed since it does some trimming already, but my implementation is not using that part of the code (I chose to prevent duplicates), so I have not tested it.

    Chris

    (@web2guru)

    I take that back, I found where it is supposed to not link the text if it would link to itself. But I found the problem, working on fixing it now.

    It has to do with whitespace around the links and keywords. Quick solution is to remove all spaces around custom keywords and their urls.

    I.E.
    change
    Badan si Badun, https://belajar.indonesiamengajar.org/2012/09/badan-si-badun-alat-peraga-anatomi-tubuh-manusia/
    to
    Badan si Badun,https://belajar.indonesiamengajar.org/2012/09/badan-si-badun-alat-peraga-anatomi-tubuh-manusia/

    This also affects using multiple keywords per line, the link will include the space

    E.G.
    if you add Home Remedies as a keyword:
    Badan si Badun, Home Remedies, https://belajar.indonesiamengajar.org/2012/09/badan-si-badun-alat-peraga-anatomi-tubuh-manusia/
    and it is in the text, it would come out as:
    <a href="https://belajar.indonesiamengajar.org/2012/09/badan-si-badun-alat-peraga-anatomi-tubuh-manusia/"> Home Remedies</a>

    Working on adding some trim functions everywhere so we don’t have this problem.

Viewing 15 replies - 76 through 90 (of 126 total)