Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi Arthur,

    I had the same thoughts… if you follow the link above, and make the little mod, you can use the excerpt to provide the short ‘tooltip’ pop-up and then use the main post content for a full detailed definition (with links).

    And Nando even fixed what I broke for UTF8!!! Yeah! Thanx Nando!

    Thread Starter vivahume

    (@vivahume)

    sorry – i don’t have much knowledge of the various encodings..

    I realize I assumed english for the “alphabetical” listing… :o(

    Hi Again,

    Ok, so with some more digging/reading of your forum I seem to have managed to sort it out…

    For the record, the magic post is here

    I just wanted to add something in regards to the information posted in the codex here where (I presume) you talk about SSL compatibility (backwards compatibility code),

    I originally couldn’t get it to work with the example code as is and had to change one line from:

    $wp_content_url = get_option( 'siteurl' );

    to:

    $wp_content_url = site_url();

    This properly returned the correct protocol (HTTPS).

    It also worked with:
    $wp_content_url = get_bloginfo('url');

    I know there are some subtle differences between these various methods to return the url, but unfortunately, I’m not well versed enough to understand the subtleties (only what works!! ;o)

    In any event, I thought I’d pass that along…

    Hi,
    Just to be more specific, it seems the plugin uses:

    get_option('siteurl')

    to pull the path info – this then ends up as https:// in the

    <script>

    tag in the header…

    I would imagine that this is used in many places?? so I’m a bit unsure why it’s getting through? [script] tag maybe??

    Hi Mike,

    I’d also like to say thanx for the great plugin. I was runing my site 100% SSL but but that is obviously not an optimal solution when only a few pages need it….

    In any event, I think I have a similar problem, I have a plugin (Simple-Real-Estate-Pack) that is adding some javascript to the header, and it seems that these are causing my page to show up as ‘partially secure’

    The problem seems to be here:

    <script type="text/javascript">
    //<![CDATA[
    	tb_pathToImage = "https://www.sherissehume.com/wp-includes/js/thickbox/loadingAnimation.gif";tb_closeImage = "https://www.sherissehume.com/wp-includes/js/thickbox/tb-close.png";</script>
    <script type="text/javascript">
    	var srp_url = "https://www.sherissehume.com/wp-content/plugins/simple-real-estate-pack-4";
    	var srp_wp_admin = "https://www.sherissehume.com/wp-admin";
    //]]>
    </script>

    the page is:
    https://www.sherissehume.com/get-started/quick-mortgageapplication/

    If I switch the WP home/site url to https:// then everything is fine… so I only presume they are using bloginfo() or something similar to pull the URL.

    I’ve played with the options of the plugin but can’t seem to find the sweet spot.

    Any thoughts on how to tweak that?

    Thanx again!

    Thread Starter vivahume

    (@vivahume)

    Ok, one last thing, if you want to juice up your gallery page you can use this to replace the function red_glossary_createList($content) [around line 133]:

    function red_glossary_createList($content){
    $glossaryPageID = get_option('red_glossaryID');
    if (is_numeric($glossaryPageID) && is_page($glossaryPageID)){
    	$glossary_index = get_children(array(
    		'post_type'		=> 'glossary',
    		'post_status'	=> 'publish',
    		'orderby'		=> 'title',
    		'order'			=> 'ASC',
    		));
    	if ($glossary_index){
    		$list .= '<div id="glossaryList">';
    		//style links based on option
    		if (get_option('red_glossaryDiffLinkClass') == 1) {
    			$glossary_style = 'glossaryLinkMain';
    		}
    		else {
    			$glossary_style = 'glossaryLink';
    		}
    
    		$alpha_link_list = '<div class="glossaryIndex">';
    		$curr_letter = '';
    		$alphabet = array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z');
    		$check_letter = reset($alphabet);
    		foreach($glossary_index as $glossary_item){
    			$letter = strtoupper(substr($glossary_item->post_title,0,1));
    			if($letter !== $curr_letter){
    				$curr_letter = $letter;
    				while(($curr_letter !== $check_letter) && $check_letter){
    					$alpha_link_list .= ' '.$check_letter.' ';
    					$check_letter = next($alphabet);
    				}
    				$list .= '<div class="glossaryIndexAnchor"><a name="'.$letter.'">'.$letter.'</a></div>';
    				$alpha_link_list .= ' <a href="#'.$letter.'" class="glossaryIndexLink">'.$letter.'</a> ';
    				$check_letter = next($alphabet);
    			}
    
    			if(!empty($glossary_item->post_excerpt)){
    				$excerpt = $glossary_item->post_excerpt . '... [<a href="' . get_permalink($glossary_item) . '">more</a>]';
    			}else{
    				$excerpt = $glossary_item->post_content;
    			}
    
    			if (str_word_count($excerpt) > 25) $excerpt = implode(' ',array_slice(str_word_count($excerpt,1),0,25)).' ... [<a href="' . get_permalink($glossary_item) . '">more</a>]';
    			$list .= '<div class="glossaryTerm"><a class="' . $glossary_style . '" href="' . get_permalink($glossary_item) . '">'. $glossary_item->post_title . '</a> - '.$excerpt.'</div>';
    
    		}
    		//finish of the alphabet
    		if($check_letter){
    			while($check_letter){
    				$alpha_link_list .= ' '.$check_letter.' ';
    				$check_letter = next($alphabet);
    			}
    		}
    		$list .= '</div>';
    		$alpha_link_list .= '</div>';
    		}
    	}
    return $content.$alpha_link_list.$list;
    }

    This will create a gallery page with an alphabetical index at the top that links to the Alphabetical anchors with your terms. Also includes a short summary of the term (from excerpt or content) – 25 words max – and adds a ‘… [more]’ to the end of the line if it truncates the definition…. It does ignore the tooltip hover though…

    There are a few more styles used, you can do something like:

    a.glossaryIndexAnchor {color: #111111;}
    a.glossaryIndexAnchor:hover {color: #111111;}
    
    .glossaryIndexAnchor{
    	display: block;
    	width: 100%;
    	border-bottom: 1px #CCC solid;
    	font-size: 2.0em;
    	margin-top: 15px;
    	padding-bottom: 5px;
    }
    .glossaryIndex{
    	margin: 0 auto;
    	font-size: 1.5em;
    	text-align: center;
    }
    
    .glossaryIndexLink{}
    .glossaryTerm{}

    have fun!

    Thread Starter vivahume

    (@vivahume)

    Oh you can also to the same for the gallery page…

Viewing 7 replies - 1 through 7 (of 7 total)