Forum Replies Created

Viewing 15 replies - 61 through 75 (of 87 total)
  • Thread Starter Wildcard

    (@thenewguy_14)

    Yeah that’s my one concern is updating and loosing my changes…can you tell me how to access the taxonomy of the fdm-menu-item or what it is. Before to add fields to the fdm-menu-section i used that plugin i refereed to in my other post, the tax-meta-class plugin….for that i used the taxonomy of fdm-menu-section to add the field to that post page but i cant for the life of me figure out how to get it on the fdm-menu-item post edit page.
    Is there a taxonomy for that or is there a way i can add one some how…the plugin in allows // taxonomy name, accepts categories, post_tag and custom taxonomies. But i am not sure if any of these apply to the fdm-menu-item post edit page. Is there a way to add a category or post tag i tried using the section tag i.e. a menu item is in the snacks section tried using snacks but the special field didn’t show up on the snacks items pages….So if i could get this plugin to work for adding a class field that would be awesome….

    Thread Starter Wildcard

    (@thenewguy_14)

    So i see in the template files it should just show up but its not here is the code for my template and how i am using it…i am tryin to just use the shortcode in my template my wordpress loop is in the header so not sure if that has something to do with

    <?php get_header(); ?>
        <div class="col-xs-12 col-sm-8 col-sm-offset-4 sectionWrapper"  data-spy="scroll" data-target=".pager" data-offset-top="100">
            <?php if (class_exists('MultiPostThumbnails')) {$imgURL = MultiPostThumbnails::get_post_thumbnail_url(get_post_type(), 'secondary-image', NULL);}?>
            <div class="row sectionHolder">
                <div id="firstSection" class="col-xs-12 col-sm-11 section one home">
                    <img class="img-responsive" src="<?php echo $imgURL ?>"/>
                    <p class="tagline"></p>
                </div>
                <div id="lunchSection" class="col-xs-12 col-sm-11 section two">
                    <h1 class="page-title">Lunch Menu</h1>
                    <div class="menu-wrapper">
                        <?php echo do_shortcode("[fdm-menu id=62]");?>
                    </div>
                </div>
                <div id="dinnerSection" class="col-xs-12 col-sm-11 section three">
                    <img class="img-responsive" src="/wp-content/themes/wpBootStrap/images/HV-Menu.png" />
                </div>
                <div id="pantrySection" class="col-xs-12 col-sm-11 section four">
                    <img class="img-responsive" src="/wp-content/themes/wpBootStrap/images/HV-Menu.png" />
                </div>
                <div id="kidsSection" class="col-xs-12 col-sm-11 section five">
                    <img class="img-responsive" src="/wp-content/themes/wpBootStrap/images/HV-Menu.png" />
                </div>
            </div>
            <nav class="pager navbar-fixed hidden-xs">
                <ul class="pagination nav">
                    <li class="dot active"><a href="#firstSection"></a></li>
                    <li class="dot"><a href="#lunchSection"></a></li>
                    <li class="dot"><a href="#dinnerSection"></a></li>
                    <li class="dot"><a href="#pantrySection"></a></li>
                    <li class="dot"><a href="#kidsSection"></a></li>
                </ul>
            </nav>
        </div>
    </div><!-- row pageWrapper -->
    
    <?php get_footer(); ?>
    Thread Starter Wildcard

    (@thenewguy_14)

    Just so people know I couldn’t get the ACF to work i ended up using a plugin called Tax-Meta-Class you load activate the plugin and go into the tax-add-meta.php file and you can comment out all the fields you don’t want then you have to change the $config array so that he pages is set to what you want in this case i need to add images and a few more fields to the fdm-menu-section post page so i simple just changed that setting to fdm-menu-section so that my custom meta boxes were added there.

    heres the full code for that tax-add-metabox.php page

    <?php
    /*
    Plugin Name: Taxonomy meta class
    Plugin URI: https://en.bainternet.info
    Description: Tax meta class usage demo
    Version: 2.1.0
    Author: Bainternet, Ohad Raz
    Author URI: https://en.bainternet.info
    */
    
    //include the main class file
    require_once("Tax-meta-class.php");
    if (is_admin()){
      /*
       * prefix of meta keys, optional
       */
      $prefix = 'ba_';
      /*
       * configure your meta box
       */
      $config = array(
        'id' => 'meta_box',          // meta box id, unique per meta box
        'title' => 'Meta Box',          // meta box title
        'pages' => array('fdm-menu-section'),  // taxonomy name, accept categories, post_tag and custom taxonomies
        'context' => 'normal',            // where the meta box appear: normal (default), advanced, side; optional
        'fields' => array(),            // list of meta fields (can be added by field arrays)
        'local_images' => false,          // Use local or hosted images (meta box images for add/remove)
        'use_with_theme' => false          //change path if used with theme set to true, false for a plugin or anything else for a custom path(default false).
      );
    
      /*
       * Initiate your meta box
       */
      $menu_section_meta =  new Tax_Meta_Class($config);
    
      /*
       * Add fields to your meta box
       */
    
      //text field
      $menu_section_meta->addText($prefix.'menu_section_navText',array('name'=> __('Navigation Text','tax-meta'),'desc' => 'Enter text for section navigation'));
      /*//textarea field
      $menu_section_meta->addTextarea($prefix.'textarea_field_id',array('name'=> __('My Textarea ','tax-meta')));
      //checkbox field
      $menu_section_meta->addCheckbox($prefix.'checkbox_field_id',array('name'=> __('My Checkbox ','tax-meta')));*/
      //select field
      $menu_section_meta->addSelect($prefix.'select_menu_id',array(null=>null,'selectLunch'=>'Lunch','selectDinner'=>'Dinner'),array('name'=> __('Menu Selection','tax-meta'), 'std'=>null));
      /*//radio field
      $menu_section_meta->addRadio($prefix.'radio_field_id',array('radiokey1'=>'Radio Value1','radiokey2'=>'Radio Value2'),array('name'=> __('My Radio Filed','tax-meta'), 'std'=> array('radionkey2')));
      //date field
      $menu_section_meta->addDate($prefix.'date_field_id',array('name'=> __('My Date ','tax-meta')));
      //Time field
      $menu_section_meta->addTime($prefix.'time_field_id',array('name'=> __('My Time ','tax-meta')));
      //Color field
      $menu_section_meta->addColor($prefix.'color_field_id',array('name'=> __('My Color ','tax-meta')));*/
      //Image field
      $menu_section_meta->addImage($prefix.'menu_section_image',array('name'=> __('Menu Section Image ','tax-meta')));
     /* //file upload field
      $menu_section_meta->addFile($prefix.'file_field_id',array('name'=> __('My File ','tax-meta')));
      //wysiwyg field
      $menu_section_meta->addWysiwyg($prefix.'wysiwyg_field_id',array('name'=> __('My wysiwyg Editor ','tax-meta')));
      //taxonomy field
      $menu_section_meta->addTaxonomy($prefix.'taxonomy_field_id',array('taxonomy' => 'category'),array('name'=> __('My Taxonomy ','tax-meta')));
      //posts field
      $menu_section_meta->addPosts($prefix.'posts_field_id',array('args' => array('post_type' => 'page')),array('name'=> __('My Posts ','tax-meta')));
    */
      /*
       * To Create a repeater Block first create an array of fields
       * use the same functions as above but add true as a last param
    
      $repeater_fields[] = $menu_section_meta->addText($prefix.'re_text_field_id',array('name'=> __('My Text ','tax-meta')),true);
      $repeater_fields[] = $menu_section_meta->addTextarea($prefix.'re_textarea_field_id',array('name'=> __('My Textarea ','tax-meta')),true);
      $repeater_fields[] = $menu_section_meta->addCheckbox($prefix.'re_checkbox_field_id',array('name'=> __('My Checkbox ','tax-meta')),true);
      $repeater_fields[] = $menu_section_meta->addImage($prefix.'image_field_id',array('name'=> __('My Image ','tax-meta')),true);
      */
      /*
       * Then just add the fields to the repeater block
       */
      //repeater block
      //$menu_section_meta->addRepeaterBlock($prefix.'re_',array('inline' => true, 'name' => __('This is a Repeater Block','tax-meta'),'fields' => $repeater_fields));
      /*
       * Don't Forget to Close up the meta box deceleration
       */
      //Finish Meta Box Decleration
      $menu_section_meta->Finish();
    }

    Then the hard part was getting it to loop and show what I wanted I had to my my own database query and do a bunch of stuff to get it to work right. But some might be smarter then me so you can find out how to query for the application of your choosing basically just look at your database and see how it is being saved and query that….

    I dont know why I couldn’t get the other plugins to work but this is my solution…

    Cool can you let me know if anything gets updated

    Same here so need to figure this out clients are emailing us about why there feeds are not up.

    Thanks

    Thread Starter Wildcard

    (@thenewguy_14)

    ok so i cant even get ACF to show the image i have searched every where but no ones answers are working….i have tried adding the get_field and all there code into my own template but it wont show up and even tried customizing your template to get it to show but nothing will work. I can get the image upload button to show up in the admin and even the thumbnail but it wont display on the front end…you got any ideas on how to get this image to show.

    Thread Starter Wildcard

    (@thenewguy_14)

    So i just uploaded ACF and it is great cause i can easily add the image field but it has a lot of stuff i don’t really need it would be great to get other plugin to extend your class with the other plugin if it is possible…..the other plugin came from
    Bainternet
    and its just a lighter code so if you have any suggestions to get this to work that would be great but for now i am gonna customize the templates to get the ACF to work….thanks and let me know

    Thread Starter Wildcard

    (@thenewguy_14)

    just had to run an updated instead of just changing the rows

    UPDATE wp_cf7dbplugin_submits SET form_name=’Candidate CV Submission’ WHERE form_name=’Canidate CV Submission’

    Thread Starter Wildcard

    (@thenewguy_14)

    So I missed spelled the form name in the form and now i need to try and get all those forms into the right form name db. I tried to change it in our phpwebadmin but it would update in the wp admin. Is there something i am missing?

    Thread Starter Wildcard

    (@thenewguy_14)

    cool thanks i thought this is what i would have to do but wanted to make sure it wasnt possible to get that link clickable

    Thread Starter Wildcard

    (@thenewguy_14)

    So the screenshot wont link for viewing but basiclly it show the field as a plain text string and not a clickable link jsut need to know how to make it a clickable link…..please

    Thread Starter Wildcard

    (@thenewguy_14)

    how do i make it a clickable link

    Thread Starter Wildcard

    (@thenewguy_14)

    hello michael,

    Hey so still looking for a solution for this. I have made it a little further and added a FileUrl and have the linked saved in there. I even tried it with html tags and with out and i still cant click on the field in the admin area. How do i make this table get saved with html tags and not strip out the a tags when it is saved to the DB. here is my code that i am trying to use iused you save to an alternate location and we go the files to upload but still cant make it a link in the admin

    // remove most of the path stuff...
     			  $sanefile = str_replace('/var/www/vhosts/beta.tangentwest.com/httpdocs/','',$newfile);
    			  $filename = str_replace('/var/www/vhosts/tangentwest.com/beta/wp-content/uploads/cv-downloads/','',$sanefile);
    			  $actualLink = str_replace('/var/www/vhosts/tangentwest.com/beta','',$sanefile);
            // make a copy of file to new director
            copy($formCopy->uploaded_files[$fieldName], $newfile);
            // save the path to the copied file to the cfdb database
            $formCopy->posted_data[$fieldName] = str_replace('/var/www/vhosts/tangentwest.com/beta','',$sanefile);
    		$formCopy->posted_data['fileUrl'] = '<a href="https://beta.tangentwest.com'. $actualLink .'">' . $filename . '</a>';
            // delete the original file from $formCopy
            unset($formCopy->uploaded_files[$fieldName]);

    and this code saves in the admin area like in the jpeg attached at

    Screen Shot

    Thread Starter Wildcard

    (@thenewguy_14)

    Hey still haven’t figured this one out. Like I said i put the code in my functions file and it gets read cause i can see the file upload filed is filled with the path to where it is suppose to be saved but there is no files in the folder. I made sure all the folders in the path were writable but still no luck on getting the files to save in a new directory. I cant figure out what i am missing….

    Thread Starter Wildcard

    (@thenewguy_14)

    Hey so i use the code and put it in my functions file and the code is being read. So now in the backend the file upload field is filled in with the path to the directory but its not being saved in the folder i have made all folders leading to this path writable but still no luck….any ideas on what is going wrong?

    i also tried adding the url thing in the comments so that she would be able to open them from that directory but still no luck

    any ideas would be great….oh and i chagned all the fields in your code to what they are in my code

    thanks

Viewing 15 replies - 61 through 75 (of 87 total)