Forum Replies Created

Viewing 15 replies - 1 through 15 (of 24 total)
  • _

    (@viniciusandre)

    Thanks for the snippet!

    I’ve ran into this kind of problem:
    if (sidebar has widget) –> show sidebar
    else –> show some widgets by hand

    The results:

    Function to verify if sidebar has a widget:
    ————

    function is_sidebar_active($sidebar_id, $force = false){
    
    		static $sidebars_widgets;
    
    		if($force || !isset($sidebars_widgets)){
    
    			$sidebars_widgets = get_option('sidebars_widgets', array());
    
    		}
    
    		if((int)$sidebar_id) $sidebar_id = sprintf('sidebar-%d', $sidebar_id);
    
    		return is_array($sidebars_widgets[$sidebar_id]) && count($sidebars_widgets[$sidebar_id]);
    
    	}

    Code in sidebar.php:
    ————

    if (is_sidebar_active(1))
    
    				dynamic_sidebar('Blogs: Lateral Interna');
    
    			else {
    
    				widget_perfil();
    
    				$args = array (
    
    					'title' => '',
    
    					'before_widget' => '<li class="widget">',
    
    					'after_widget' => '</li>',
    
    					'before_title' => '<h2>',
    
    					'after_title' => '</h2>'
    
    				);
    
    				$instance = array ( 'title' => 'Categorias', 'number' => 1 );
    
    				$widget = new WP_Widget_Categories();
    
    				$widget->widget($args,$instance);
    
    				$args = array ( 'title' => '' );
    
    				$instance = array ( 'title' => 'Tweets @revistatitude', 'number' => 1 );
    
    				$widget = new WP_Widget_Tweets();
    
    				$widget->widget($args,$instance);
    
    			}

    Hope it helps someone.

    _

    (@viniciusandre)

    Hi!

    Yes, that’s possible, but if you’re on WordPress.com I don’t think so, once it will depend on a plugin, or even some coding for it.

    Forum: Fixing WordPress
    In reply to: mail() again..
    _

    (@viniciusandre)

    Don’t you even get them as SPAM? That’s really common.

    I always use WP-SMTP to override any mail() call by an SMTP server. It’s more reliable in terms of SPAM and mailing, in my opinion.

    _

    (@viniciusandre)

    Hi jeyush.

    That’s confusing to me. Are you using a specific plugin or theme to generate such URL? I’m just stuck to help you too.

    _

    (@viniciusandre)

    Again. You need to provide the full URL for both SWF and XML links.

    SWFObject("TiltViewer.swf" and fo.addVariable("xmlURL", "gallery.xml");

    And also, if the flash reffers for a XML or any other info by Actionscript, you need to put a full URL there too.

    _

    (@viniciusandre)

    For WordPress, look for Atahualpa and Thematic themes (there’s some others). And for CSS, there’s the BluePrint framework. They are very good to no start from zero while developing themes.

    Regarding updates, once you click on “Update WordPress” in your control panel, everything into wp-content will be kept. And if you want to manually update (download and decompress WordPress yourself), the wp-content folder doesn’t need to be replaced.

    So… don’t worry and keep working. =D

    _

    (@viniciusandre)

    Encrypted? I’m not sure if I got it.

    To be loaded by a browser, Javascript, CSS, and HTML needs to be text, so if there’s something hidden, hashed or anything in the source code, just copy from the loaded HTML in your browser.

    There’s some CSS in the functions.php file of this theme, too. Isn’t what you’re looking for?

    Hope it helps. =D

    _

    (@viniciusandre)

    It’s easier to use Kimili Flash Embed plugin. That will reduce all this code to just one line.

    Also, you have to provide the full URL for the file. Use some link function like <?php bloginfo('template_directory'); ?>/flashfile.swf.

    Hope it helps.

    _

    (@viniciusandre)

    What page is “?page_id=3&category=10”?
    What’s the error, exactly?

    If it’s a category, that’s a wrong way of accessing category pages.

    If you changed the URLs to pretty permalinks, you must be sure to use the URL functions on all links in your theme. Like get_permalink() or get_category_link().

    Also, you must have mod_rewrite enabled in your server (check phpinfo() for that), and the .htaccess file in the root of your WordPress installation must have the required rules (see the permalinks option page, it gives you the .htaccess content if there’s no server writing permission for the file).

    Forum: Fixing WordPress
    In reply to: category gallery
    _

    (@viniciusandre)

    I’m not sure if I got it.. again.

    Your function looks ok. Congratulations.
    Perhaps you could use only wp_list_categories for the same effect. It’s up to you.

    When you go to http://localhost.localdomain/wp/category/portfolio/commissioned/ we’re talking about your theme’s category.php file. There will be the way your posts are listed in a category browsing page.

    Hope it helps. =D

    _

    (@viniciusandre)

    Humn… sorry. Now I get it!

    Comments reply is not a built-in feature in WordPress. When you use WordPress at WordPress.com, you’re using a customized and optimized installation of WordPress.

    You’ll probably need to download and install a plugin yourself. Look for WordPress Threaded Comments.
    http://ww.wp.xz.cn/extend/plugins/wordpress-thread-comment/

    Hope it helps.

    _

    (@viniciusandre)

    I coded something myself. Didn’t packed everything into a plugin… yet.

    Basically I’ve set meta_values like prices, payment methods, etc for the posts I wanted to be products. So there’s a button that add the posts ID to a $_COOKIE variable array, used to process the check out in another page.

    No plugins met my needs in this case because I used some remote services to calculate shipment prices and so, but I know there’s a lot of plugins for e-commerce in WordPress.

    _

    (@viniciusandre)

    If you want extra information on your posts, you can use (as you said =D) custom fields. There’s some plugins that organize these values to provide an easier administration. I know about Flutter [1] (not much).

    There’s a very well documented section about how to write plugins in WP docs [2].

    [1] http://flutter.freshout.us/
    [2] http://codex.ww.wp.xz.cn/Writing_a_Plugin

    _

    (@viniciusandre)

    WordPress wasn’t made specifically for e-commerce, but I’ve been running one quite well till now. It has all the advantages of a standard WP installation, like a nice indexation on search engines and ease of use.

    You’ll depend on good WordPress developers to do that if you’re thinking on something specifically made for your business, otherwise there’s a whole set of plugins to WP e-commerce.

    _

    (@viniciusandre)

    That’s possible by a pseudocron checking the RSS feeds of each other, then marking a meta_value indicating that there’s an older entry in the other website, referring it as the original one.

    It sounds like a specific feature, so most probably you’ll need a bit of coding to achieve it. I don’t know about any plugin that can already do this.

    Hope it helps.

Viewing 15 replies - 1 through 15 (of 24 total)