ThemeShaper Forums » Thematic

[closed]

Featured Category/Theme Options Plugin

(9 posts)
  • Started 1 year ago by Jagst3r15
  • Latest reply from Jagst3r15
  • This topic is not resolved
  1. Alright, so this is might be a little complex/off-topic, but any idea how I would move the Acamas featured category options to the options framework plugin? Bear in mind Devin updated his thematic options https://github.com/devinsays/thematic-options to use the plugin and therefore the settings api, so I think its a good idea to switch em over (plus I am working on a responsive version of the theme). I think I would have to add an array to the options.php file and then something else to either the functions.php file or the theme-functions.php file. Ive exhausted googling for the solution so hopefully someone can help.

    Also, I noticed that I cannot remove the thematic options for 0.9.8 (yes I know its a dev release, but it should be filterable regardless, shouldn't it?)

    Posted 1 year ago #
  2. no it doesn't need to be filterable. in the SVN version the options are added to a hook. don't want them? remove them from the hook.

    the relevant function from extensions/theme-options.php

    function thematic_opt_add_page() {
    
    	$thematic_opt_page = add_theme_page ('Theme Options', 'Theme Options', 'edit_theme_options', 'thematic_opt', 'thematic_do_opt_page');
    	$thematic_opt_page = apply_filters ('thematic_theme_add_opt_page', $thematic_opt_page );
    
    	if ( ! $thematic_opt_page ) {
    		return;
    	}
    
    	add_action( "load-$thematic_opt_page", 'thematic_opt_page_help' );
    }
    
    add_action( 'admin_menu', 'thematic_opt_add_page' );

    to remove the page:

    function kia_remove_theme_options(){
    	remove_action( 'admin_menu', 'thematic_opt_add_page' );
    }
    add_action('init','kia_remove_theme_options');

    also, i believe devin has an example in his plugin for how to make a dropdown list of categories. can you use that?

    Posted 1 year ago #
  3. Sorry but my php skills are quite low :(...I assume I need to change this:


    // Pull all the categories into an array
    $options_categories = array();
    $options_categories_obj = get_categories();
    foreach ($options_categories_obj as $category) {
    $options_categories[$category->cat_ID] = $category->cat_name;
    }

    and this:


    $options[] = array( "name" => "Select a Category",
    "desc" => "Passed an array of categories with cat_ID and cat_name",
    "id" => "example_select_categories",
    "type" => "select",
    "options" => $options_categories);

    Everything says "options" so I am not sure which words to change to "acms" (Acamas)..any help is appreciated :)

    Posted 1 year ago #
  4. you don't change anything to acms. have you read devin's instructions for how to implement his options panel? everything says $options b/c his plugin builds the options panel from that $options array.

    Posted 1 year ago #
  5. wow that was stupid on my part. thanks :)...but now, how would I change the stuff in the acamas functions.php that has acms_featuredcategory or whatnot? just change the id "example_select_categories", to acms_featuredcategory?

    Posted 1 year ago #
  6. honestly i have no idea how acamas is doing things. i'm not familiar with it at all. is it using the settings api? i'm doubtful, b/c thematic is only just getting to that.

    devin shows how to retrieve the saved option data... so wherever acamas is using the featured category ID, you'll need to serve it up in the options framework mode.

    Posted 1 year ago #
  7. This is the original: http://pastebin.com/ZkDLqTkD . I need to remove from lines 1 to 197..then its just a matter of plugging in the options framework taxonomy stuff, as per the example:


    of_get_option('example_select_categories'): category id = <?php echo of_get_option('example_select_categories', 'no entry' ); ?>

    So I think like here: if (get_settings( $childvalue['id'] ) I need to replace "get_settings" with "of_get_option" and [id] with 'example_select_categories' (just leaving it as the example for now, will change once ive got this thing figured out.

    I'll keep trying to get this, but any help is appreciated ;)

    Posted 1 year ago #
  8. sorry bro, but I have to draw the line on free help somewhere... and updating Acamas to use Options Framework is a bit beyond what i'm willing to do for the forum.

    if you want to hire me for a short stint, you can email me at my username @ gmail. otherwise, good luck!

    Posted 1 year ago #
  9. Its okay, I think ima just leave it as is. Using the settings api isnt paramount for one little function anyway imo

    Posted 1 year ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.