Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter BBoxed

    (@bboxed)

    here is what the shortcode looks like, can someone help me edit this, becuase ive been trying and the page wont load, if i edit the php file and save it.

    # SHORTCODE:
        #   dcs_recent_posts (display single news in shorter version)
        # PAREMAETERS:
        # NOTES:
        public function dcs_recent_posts($atts, $content=null, $code="")
        {
            global $post;
            global $more;    // Declare global $more (before the loop).
            global $wp_query;
            global $post, $page, $numpages, $multipage, $more, $pagenow, $pages;        
    
            $out = '';
            $defatts = Array(
              'count' => 3,
              'image' => 'true',
              'desc' => 'true',
              'voting' => 'false',
              'cat' => '',
              'catex' => '',
              'paged' => 'false'
            );
    
            $atts = shortcode_atts($defatts, $atts);
            $att_count = $atts['count'];
            $att_image = $atts['image'];
            $att_desc = $atts['desc'];
            $att_voting = $atts['voting'];
            $att_cat = $atts['cat'];
            $att_catex = $atts['catex'];
            $att_paged = $atts['paged']; 
    
            $paged = ($wp_query->query_vars['page']) ? $wp_query->query_vars['page'] : 1;
            $args=array('posts_per_page' => $att_count, 'post_type' => 'post');
    
            if($att_paged == 'true')
            {
                $args['paged'] = $paged;
            }        
    
            if($att_cat != '')
            {
                $args['category__in'] = explode(',', $att_cat);
            }
            if($att_catex != '')
            {
                $args['category__not_in'] = explode(',', $att_catex);
            } 
    
            $new_query = new WP_Query($args);
            $max_page = $new_query->max_num_pages; 
    
            if($new_query->have_posts())
            {
                while($new_query->have_posts())
                {
                    $new_query->the_post();                
    
                    $imagepath = get_post_meta($post->ID, 'post_image', true);
                    $imagedesc = get_post_meta($post->ID, 'post_image_desc', true);
                    $videopath = get_post_meta($post->ID, 'post_video', true);
                    $disablevideo = get_post_meta($post->ID, 'post_disable_video', true);
                    $postdesc = get_post_meta($post->ID, 'post_desc', true);
                    $novoting = get_post_meta($post->ID, 'post_novoting', true);
                    $more = 0;
    
                    $month = get_the_time('n', $post->ID);
                    $year = get_the_time('Y', $post->ID); 
    
                    $out .= '
    
                        <div class="blog-post">';   
    
                            if($videopath != '' and $att_image == 'true' and $disablevideo == '')
                            {
                                $out .= '<div class="photo">'.do_shortcode($videopath).' '.($att_desc == 'true' ? $imagedesc : '').'</div>';
                            } else
                            if($imagepath != '' and $att_image == 'true')
                            {
                                $out .= '<div class="photo"><a class="async-img image" href="'.get_permalink($post->ID).'" rel="'.$imagepath.'" ></a>'.($att_desc == 'true' ? $imagedesc : '').'</div>';
                            } else
                            {
                                $out .= '<div class="post-no-photo-spliter"></div>';
                            }                   
    
                            $out .= '<div class="post-content">
                                <a href="'.get_comments_link($post->ID).'" class="comments">'.get_comments_number($post->ID).'</a>
                                <div class="info">
                                    <a class="date-left"></a><a href="'.get_month_link($year, $month).'" class="date">'.get_the_time('F j, Y').'</a><a class="date-right"></a>
                                    Posted by&nbsp;<a href="'.get_author_posts_url($post->post_author).'" class="author">'.get_the_author_meta('display_name', $post->post_author).'</a> in ';
    
                                    $catlist = wp_get_post_categories($post->ID);
                                    $count = count($catlist);
                                    for($i = 0; $i < $count; $i++)
                                    {
                                        if($i > 0)
                                        {
                                           $out .= ', ';
                                        }
                                        $cat = get_category($catlist[$i]);
                                        $out .= '<a href="'.get_category_link($catlist[$i]).'" >'.$cat->name.'</a>';
    
                                    }                                
    
                                $out .= '</div>';
    
                                $out .= '<h2><a href="'.get_permalink($post->ID).'">'.$post->post_title.'</a></h2>';
    
                                $old_page = $page;
                                $page = 1;
                                if($postdesc != '')
                                {
                                    $out .= apply_filters('the_content', $postdesc);
                                    $out .= ' <a href="'.get_permalink($post->ID).'">Read&nbsp;more</a>';
                                } else
                                {
                                    $out .= apply_filters('the_content', get_the_content('Read&nbsp;more'));
                                }
                                $page = $old_page;
    
                               // post tags list
                               $out .= '<div class="blog-post-bottom-wrapper">';
    
                                if(GetDCCPInterface()->getIGeneral()->showPostVoting() and $novoting == '' and $att_voting == 'true')
                                {
                                    global $dcp_votingshortcodes;
                                    if(isset($dcp_votingshortcodes))
                                    {
                                        $out .= $dcp_votingshortcodes->votePostStarsCreate($post->ID, GetDCCPInterface()->getIGeneral()->showVotingGlypsNum(), 'left', $post->post_type);
                                    }
                                }                                
    
    $posttags = get_the_tags();
                               $count = 0;
                               if($posttags !== false)
                               {
                                    $count = count($posttags);
                               }
    
                               if($count > 0)
                               {
                                   $out .= '<div class="blog-post-tags">
                                            <span class="name">Tags:</span> ';
    
                                   $i = 0;
                                   foreach($posttags as $tag)
                                   {
                                       if($i > 0)
                                       {
                                           $out .= ',&nbsp;';
                                       }
                                       $title = '';
                                       if($tag->count == 1) { $title = 'One post'; } else { $title = $tag->count.' posts'; } 
    
                                       $out .= '<a href="'.get_tag_link($tag->term_id).'" class="tag link-tip-bottom" title="'.$title.'">'.$tag->name.'</a>';
                                       $i++;
                                   }
                                   $out .= '</div>';                                            
    
                               } else
                               {
                                    if(GetDCCPInterface()->getIGeneral()->showNoTags())
                                    {
                                       $out .= '<div class="blog-post-tags">
                                                There are no tags associated with this post.
                                            </div>';
                                    }
                               }
                            $out .= '<div class="clear-both"></div></div>';
                            $out .= '</div> <!-- content -->
                        </div> <!-- blog-post -->';
    
                } // while
            }
    
            if($att_paged == 'true')
            {
                $out .= GetDCCPInterface()->getIGeneral()->renderSitePagination($paged, $max_page, false);
            }        
    
            wp_reset_query();
            return $out;
        }    
    
    } // class 
    
    ?>
    Forum: Plugins
    In reply to: wpbook cant get it to work.
    Thread Starter BBoxed

    (@bboxed)

    here is my app

    https://apps.facebook.com/mxlifacilcomments/
    but i so not see the comments on my site.

    Forum: Plugins
    In reply to: wpbook cant get it to work.
    Thread Starter BBoxed

    (@bboxed)

    also
    https://apps.facebook.com/mxlifacilcomments/

    Application Temporarily Unavailable
    Runtime errors:

    URLExceptionEmpty URLs not allowed here

    fb:iframe: Empty URLs not allowed here

    Sorry, the application you were using is experiencing a problem. Please try again later.

    Forum: Plugins
    In reply to: wpbook cant get it to work.
    Thread Starter BBoxed

    (@bboxed)

    when i click the check permissions link… it takes me to facebook but it returns a blank page..

    to be more specific. it gives me facebook header.. sidebar.. but no content.

    the ?app_tab=true&fb_force_mode=fbmle i got it. i was doing it wrong

    Thread Starter BBoxed

    (@bboxed)

    that didnt work, anyone else?

    <?php if(function_exists(‘sbc’)){ sbc();} else { ?>
    <form id=”searchform” method=”get” action=”<?php bloginfo(‘url’); ?>”>
    <input name=”s” id=”s” type=”text” value=”<?php echo $blognews[“search”]; ?>” onfocus=”if(this.value==this.defaultValue)this.value=”;” onblur=”if(this.value==”)this.value=this.defaultValue;” />
    <input type=”submit” class=”searchsubmit” value=”” />
    </form>

    paste the code pretty much, where you want the search bar to be at…

    Thread Starter BBoxed

    (@bboxed)

    i fixed the search text height, it was a little mistake of :,;

    also. made the input round.

    /* 5. Search Form */
    
    form#sbc-search {
    display:inline;
    width:800px; /*define a width*/
    }
    
    form#sbc-search input#s {
    -moz-border-radius:15px 15px 15px 15px;
    background:none repeat scroll 0 0 #FCB342;
    border:0 solid #BBBBBB;
    float:left;
    margin:6px 10px 10px 0;
    padding:4px 10px;
    width:400px;
    height:60px;
    font-size:20px;
    }
    
    form#sbc-search select#cat {
    -moz-border-radius:15px 15px 15px 15px;
    background:none repeat scroll 0 0 #FCB342;
    border:0 solid #BBBBBB;
    float:left;
    margin:6px 10px 10px 0;
    padding:4px 10px;
    width:200px;
    height:60px;
    font-size:20px;
    }
    
    form#sbc-search input#sbc-submit {
    -moz-border-radius:15px 15px 15px 15px;
    background:none repeat scroll 0 0 #FCB342;
    border:0 solid #BBBBBB;
    float:left;
    margin:6px 10px 10px 0;
    padding:4px 10px;
    width:100px;
    height:50px;
    font-size:20px;
    }

    the thing is that i want them to look the same, and style the arrow, still not able to do it

    Thread Starter BBoxed

    (@bboxed)

    thanks it worked, but if you could help with something else.

    alright i changed a lil bit of the coding to make it the way i want it.
    but now there is a couple more things that you can help me with

    1. i think. i did it right, set the 3 things to have the same height, but it looks like its not working right…. or it could be that the input field, is not round, how can i make it round. also the SEARCH button, is not aligning right

    2. as you may see on the code, i want the search TEXT for the user input for it to be bigger…

    3. lastly how can i add a custom image to the drop down menu, say i want to add my own arrow, for it too look nicer.

    form#sbc-search {
    display:inline;
    width:800px; /*define a width*/
    }
    
    form#sbc-search input#s {
    background:none repeat scroll 0 0 #FCB342;
    border:0 solid #BBBBBB;
    float:left;
    margin:6px 10px 10px 0;
    padding:4px 10px;
    width:400px;
    height:50px;
    font-size;20px;
    }
    
    form#sbc-search select#cat {
    -moz-border-radius:15px 15px 15px 15px;
    background:url("arrow.png") no-repeat scroll 88% 50% #FCB342;
    border:0 solid #BBBBBB;
    height:50px;
    margin:0 8px 10px 0;
    padding:7px 20px;
    width:200px;
    }
    
    form#sbc-search input#sbc-submit {
    -moz-border-radius:15px 15px 15px 15px;
    background:none repeat scroll 0 0 #FCB342;
    border:0 solid #BBBBBB;
    height:50px;
    margin:0 8px 10px 0;
    width:100px;
    }
    Thread Starter BBoxed

    (@bboxed)

    im searching for something kind of like this..

    https://www.blogcatalog.com/

    where it has a directory. but also with the categories, could keep a magazine style blog.

    see how on the main page, on the bottom it has articles.
    but the main feature is too look for a listing

    Thread Starter BBoxed

    (@bboxed)

    i could pay for it, and i’ve searched the google for a couple of days now. believe..

    you should go into the folder of your theme, and look for header.php inside you should find the image header… something like <img src=”www.simpletaps.com/wp-content/themes/yourtheme/bannername.jpg”>

    what you wanna do is… add
    <img src=”www.simpletaps.com/wp-content/themes/yourtheme/bannername.jpg”>

    hope it helps

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