Support has been upgraded!
The Support Forum is closed. Not to worry! Providing the top quality support you expect and we're known for will continue! We're not ending support, just changing where you submit requests. This will provide you with the best experience possible.
Premium Support
Have you purchased an addon for Connections such as one of our premium templates or extensions with a valid license and you need help?
Please open a Support Ticket in your user account.
Free Support
Are you using the free Connections plugin? Don't worry, you are still very important to us! We are still providing you with the same high quality support that we're known for.
Please open a new support topic in the WordPress support forums for Connections.
- This topic has 16 replies, 2 voices, and was last updated 12 years ago by
Steven Zahm.
-
AuthorPosts
-
12/04/2013 at 11:25 am #274761
Steven Zahm
Keymaster@ Todd
No problem … Connections 0.8; I’ve modified the loading of templates just slightly. Now, the only thing that needs done is copy the core template from the templates to the plugins folder and activate. It will then override the core template so one can tweak away and it’ll be update safe.
This was part of the plan from the beginning when I redesigned the templating system back in March … and there’s is more to come to make this even easier and more flexible.
https://github.com/shazahm1/Connections/issues/21803/10/2014 at 4:53 pm #281856Bree
GuestHi there! I had the same issue as Todd in that I am trying to get a custom template to register. I’ve been following along this thread but after I changed the line:
add_action( 'plugins_loaded', array( 'CN_Custom_Template', 'register' ), 11 );I had the plugin/template register in WordPress, but I get the following PHP error on the front-end of the website for each instance of a contact card:
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'CN_Custom_Template::custom' was given in /hermes/bosweb/web173/b1870/nf.finningcompactedmont/public_html/finningcompactedmonton.com/wp-includes/plugin.php on line 429I’m realizing that changing the following line:
$template->part( array( 'tag' => 'card', 'type' => 'action', 'callback' => array( $this, 'custom' ) ) );Whatever name I enter in the place where ‘custom’ resides, that word is attached to the above error in place of ‘CN_Custom_Template::custom’
Annnnnd, I’m at a loss! Any help would be greatly appreciated!!
-
This reply was modified 12 years, 5 months ago by
Steven Zahm. Reason: Update code blocks for readability
03/11/2014 at 9:01 am #281910Steven Zahm
Keymaster@ Bree
Assuming you modding the Default Card template … Change all 4 instances of
CN_Card_TemplatetoCN_Custom_Template(or other unique name). Then update the following as needed with your details:$atts = array( 'class' => 'CN_Card_Template', 'name' => 'Default Entry Card', 'slug' => 'card', 'type' => 'all', 'version' => '2.0', 'author' => 'Steven A. Zahm', 'authorURL' => 'connections-pro.com', 'description' => 'This is the default template.', 'custom' => FALSE, 'path' => plugin_dir_path( __FILE__ ), 'url' => plugin_dir_url( __FILE__ ), 'thumbnail' => 'thumbnail.png', 'parts' => array(), );I would not change this line at all … only the tweak the code within the function to meet your needs:
$template->part( array( 'tag' => 'card', 'type' => 'action', 'callback' => array( $this, 'card' ) ) );Hope that helps.
03/12/2014 at 12:36 pm #282008Bree
GuestBrilliant! Thank you, Steve, everything seems to be working perfectly now!
03/12/2014 at 5:32 pm #282035Steven Zahm
Keymaster@ Bree
No problem! If you have a moment, I would truly appreciate a review as they really do make a difference. Many thanks in advance!
http://wordpress.org/support/view/plugin-reviews/connections07/27/2014 at 11:27 pm #298145Paul O’Neill
GuestThanks Steve – took me a few attempts following the trail but I had the same problems which are now resolved.
07/28/2014 at 9:02 am #298171Steven Zahm
Keymaster@ Paul
So you made your first custom template for Connections? Great to hear!
-
This reply was modified 12 years, 5 months ago by
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.
