Forum Replies Created

Viewing 15 replies - 1 through 15 (of 19 total)
  • Hi there,

    I found this from another post that seems to work:

    <?php echo do_shortcode(‘[nggallery id=3]’); ?>

    I suppose you could also make the area in the template file a widgetized area and drop one of the nextgen gallery widgets in there…

    Thread Starter catlady916

    (@catlady916)

    yes, it is a page…it’s the index.php file – that totally worked…thank you so much! i think i looked and researched so much that i couldn’t wrap my brain around it anymore – you’re a rockstar!!

    (=^_^=)

    Thread Starter catlady916

    (@catlady916)

    ok – that kinda worked…
    since i’m developing this locally – here’s a screenshot of what it looks like: screenshot

    what i’m trying to do (it’s for a local real estate agent) is have her post her available homes as a blog entry then it will appear on this available rentals page (the most recent 5 blog posts)

    two things:

    • it’s listing the title of the page again and not the blog title (or house address)
    • it’s not displaying the content of the blog when i use the_content (which goes back to my original dilemma) but, as you can see, will display the author’s information and such…

    although the code isn’t toally complete as far as styling goes,this is the code that’s producing the screenshot:

    <?php get_header(); ?>
    
    <div id="titleWrap">
      <div id="title">
        <?php if (have_posts()) : ?>
        <?php while (have_posts()) : the_post(); ?>
        <?php the_title('<span class="bigBlue">', '</span>'); ?>
        <?php endwhile; ?>
        <?php else : ?>
        <h2 class="center">Not Found</h2>
        <p class="center">Sorry, but you are looking for something that isn't here.</p>
        <?php get_search_form(); ?>
        <?php endif; ?>
        <div class="clear"></div>
      </div>
      <!-- end title -->
    </div>
    <!-- end titleWrap -->
    
    <div id="mainWrap">
      <div id="main">
    
        <?php include(TEMPLATEPATH . '/sidebarList.php'); ?>
    
        <div id="contentList">
          <?php rewind_posts(); ?>
          <?php if (have_posts()) : ?>
          <?php while (have_posts()) : the_post(); ?>
          <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
            <h2><a href="<?php the_permalink() ?>" rel="bookmark"
    title="Permanent Link to <?php single_post_title(); ?>">
              <?php the_title(); ?>
              </a></h2>
            <p class="authorName">by
              <?php
    the_author_meta('first_name'); ?>
              <?php
    the_author_meta('last_name'); ?>
              for
              <?php
    the_category(", ") ?>
            </p>
            <div class="entry">
              <?php the_content('<br />Read the rest of this entry &raquo;'); ?>
            </div>
            <div id="pagecomments">
            </div>
            <div class="comments">
              <div class='commentIcon'>
                <?php
    comments_number('No Comments','<span
    class="bigNum">1</span> response','<span
    class="bigNum">%</span> Comments');
    ?>
              </div>
              <?php comments_popup_link('Add Your
    Thoughts', 'Add Your Thoughts', 'Add Your
    Thoughts'); ?>
            </div>
          </div>
          <?php endwhile; ?>
          <div class="navigation">
            <div class="alignleft">
              <?php next_posts_link('&laquo;
    Previous Entries') ?>
            </div>
            <div class="alignright">
              <?php previous_posts_link('Next
    Entries &raquo;') ?>
            </div>
          </div>
          <?php else : ?>
          <h2 class="center">Not Found</h2>
          <p class="center">Sorry, but you are looking for something
            that isn't here.</p>
          <?php endif; ?>
        </div>
        <!-- end contentList -->
        <div id="pushbottom"></div>
        <!-- end of pushbottom -->
      </div>
      <!-- end main -->
    </div>
    <!-- end mainWrap -->
    <div class="clear"></div>
    <?php get_footer(); ?>

    also, i changed my reading settings to:
    front page displays a static page which is called Home. That’s using the template file home.php
    the posts page is the available rentals page. It’s using the index.php template file.

    NOW this creates a different problem, when i click on the rentals link from Home, it basically reloads the Home page and doesn’t even go to the page that the screenshot is above…

    BEFORE the settings were to show the front page as the latest posts (still set to available rentals) and it used the home.php file to automatically display the Home page (guess that’s the template hierarchy thing?)

    i’m totally confused now…

    Thread Starter catlady916

    (@catlady916)

    Hi Racer!
    Thanks so much…that did the trick!
    @shane G. – thanks for the plugins! i’m going to use the one that will email the backup to me ??

    Thread Starter catlady916

    (@catlady916)

    oh….duh! i thought ‘my_option’ called to something and that couldn’t be changed – you have made my day – you have no idea!
    i’ll be making the site live over the weekend and i’ll post the link – i cannot thank you enough ??

    Thread Starter catlady916

    (@catlady916)

    ok – i got it to work, but the text changes in all the widgets – how can i make them all unique?

    Thread Starter catlady916

    (@catlady916)

    OMG! this totally worked!!! THANK YOU SO MUCH!!!!!!

    Thread Starter catlady916

    (@catlady916)

    Oh ok! This might be what I need! I’ll try it this evening and keep you posted…thank you sooo much!

    I also made a paypal donation – you have been an extremely big help, thank you ??

    Thread Starter catlady916

    (@catlady916)

    i’m using text widgets now…but i still need to include the code to style it and i want my client to be able to just edit the text, not the code (so basically, i want the code that styles the widget to be completely hidden – so as to not cause confusion for the client)…right now, i’ve just commented out the areas to edit…like this:

    <div class="rtBox btmPad grayBrushBox">
    <div class="textArea">
    <h3><!-- ////////////// EDIT SUBTITLE ////////////// -->
    A Subtitle here
    <!-- ////////////// STOP SUBTITLE ////////////// --></h3>
    <p><!-- ////////////// EDIT CONTENT ////////////// -->
    some text that can be editable
    <!-- ////////////// STOP CONTENT ////////////// --></p>
    <!-- ////////////// DO NOT EDIT PAST THIS LINE ////////////// -->
    </div>
    </div>

    this is exactly what i’m pasting into the my custom widget plugin…the plugin automatically has the code wrapped in <?php ?> tags – so that’s where my confusion is…how do i add your <p><?php editable_option('my_option'); ?></p> to this since i can’t use <?php ?>? and where exactly does it go so only the areas inside the comments are editable and my client doesn’t have to see the code…basically, i want the widgets to have a rich text editor just like the page content and blog posts…

    is that possible? ??

    Thread Starter catlady916

    (@catlady916)

    oh yay – ‘My Option’ appears!

    so now, i think i have one more question (possibly two!)

    okay so like i said, i’m using my custom widget…

    here is what i’m trying to make a widget of:

    <div class="rtBox btmPad grayBrushBox">
    <div class="textArea">
    <p>
    some editable text here
    </p>
    </div>
    </div>

    i don’t want the client to be able to edit the divs and their classes, only where it says “some editable text here”

    so my questions are:

    1. how exactly do i define what is editable using `<p><?php editable_option(‘my_option’); ?></p>
    ? like do i wrap it like:<p><?php editable_option(‘my_option’); some editable text ?></p>`

    2. also, when i tried to insert <p><?php editable_option('my_option'); ?></p> into my custom widget just to test, it informs me that i don’t need to use the <?php p> tags, (after i went to that plugin’s site – i learned that the whole widget is wrapped in <?php p>)…because i’m new to php, every new php tag i enter, i wrap them individually so i’m not sure how to include all the code inside one tag – is it possible you could give me the exact code using `<div class=”rtBox btmPad grayBrushBox”>
    <div class=”textArea”>
    <p>
    some editable text here
    </p>
    </div>
    </div>` and how the editable_option fits inside? i can donate a lil’ fee – i really appreciate everything you’ve done…thanks for being patient with me ??

    Thread Starter catlady916

    (@catlady916)

    Awesome! thanks for the update!!
    ok, now i’m such an idiot – i plugged in the complete code you provided and nothing happened as far as seeing the “My Option” on the settings page…do i need to customize something?

    <?php   
    
     function editable_option($key) {
    	echo apply_filters('editable_option', get_option($key), $key);
    }
    
    class My_Editable_Option extends FEE_Field_Base {
    	/**
    	 * The type of object we're editing
    	 * @return string
    	 */
    	static function get_object_type() {
    		return 'option';
    	}
    
    	/**
    	 * Called when generating the HTML on the front-end
    	 * Wraps the $content in special markup, if the user has the right permissions
    	 * @return string
    	 */
    	function wrap($content, $key = 0) {
    		if ( ! $this->check($key) )
    			return $content;
    
    		return parent::wrap($content, $key);
    	}
    
    	/**
    	 * Called when a user double-clicks on an editable field
    	 * Fetches the content to be edited
    	 * @return string
    	 */
    	function get($key) {
    		return get_option($key);
    	}
    
    	/**
    	 * Called when a user clicks the "Save" button
    	 * Saves the modified content and then returns it
    	 * @return string
    	 */
    	function save($key, $content) {
    		update_option($key, $content);
    
    		return $content;
    	}
    
    	/**
    	 * Called at each step
    	 * Confirms that the current user has the right permissions to edit the field
    	 */
    	function check($key = 0) {
    		return current_user_can('manage_options');
    	}
    }
    
    function register_my_field() {
    	register_fronted_field('editable_option', array(
    		'class' => 'My_Editable_Option',
    		'title' => 'My Option',
    		'type' => 'textarea',
    	));
    }
    add_action('plugins_loaded', 'register_my_field');
    
     ?>
    Thread Starter catlady916

    (@catlady916)

    the widget logic totally worked – this was just what i was looking for…it actually helped me simplify my custom widget issue…

    i see that using the text widget, i can include the code and i’ll just use comments to section off where the client should edit

    THANKS SO MUCH!!

    (=^_^=)

    Thread Starter catlady916

    (@catlady916)

    ok cool, i’ll check this out…thanks!

    for the colors – in my custom widgets, I plan on having blue, green, gray and purple sections (they’ll be divs with background-images – they are patterned backgrounds) so they won’t have any control over the color itself but they can choose the color widget, I just want my client to be able to edit the content inside whatever color section they add…

    Thread Starter catlady916

    (@catlady916)

    thank you so much alchymyth! that TOTALLY worked!

    i’m teaching myself while following along in a book and the book’s example is a blog and it touches briefly on static pages – so i assumed that the loop was just for blog posts…

    yay!!! when i make the site live (over the weekend) – i’ll post the link…thanks!

    Thread Starter catlady916

    (@catlady916)

    oh! i thought i needed to use the loop to display blog posts – so i need it to display static page content too?

    i’ll try that this evening and keep you posted – thanks!!!

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