Jump to content


Photo

Platform Pro Forum template sidebar.


This topic has been archived. This means that you cannot reply to this topic.
42 replies to this topic

#21 julesmoretti

julesmoretti

    Advanced Member

  • Members
  • PipPipPip
  • 75 posts

Posted 16 November 2010 - 06:21 AM

Tried the plugin did not work. In which file and where can I paste that form code. I have dreamweaver set up and running. Thank you

#22 cmunns

cmunns

    Advocate

  • Members

  • 6537 posts

Posted 16 November 2010 - 07:34 PM

whatever sidebar you want to use, for example if you want to use the primary sidebar then the file you need to edit is section.sb_primary.php so that the section template function looks like this; ` function section_template() { pagelines_draw_sidebar($this->id, $this->name, 'template.dwidgets');?>


#23 julesmoretti

julesmoretti

    Advanced Member

  • Members
  • PipPipPip
  • 75 posts

Posted 16 November 2010 - 08:47 PM

Hey So I did that and got the following error in the sidebar of the forum and throughout the site: (http://test.gradiduncut.com/forums)

Parse error: syntax error, unexpected '<' in /home/gradidun/public_html/test/wp-content/plugins/wp-exec-php/wp-exec-php.php(43) : eval()'d code on line 1

This is the overall code in the section.sb_tertiary.php
 <?php
	/*
	
		Section: Tertiary Sidebar
		Author: Andrew Powers
		Description: The main widgetized sidebar
		Version: 1.0.0
	
	*/
	
	class TertiarySidebar extends PageLinesSection {
	
	   function __construct( $registered_settings = array() ) {
	
			$name = __('Tertiary Sidebar', 'pagelines');
			$id = 'sidebar_tertiary';
	
			$settings = array(
				'description' 	=> 'A tertiary widgetized sidebar for the theme that can be used in standard sidebar templates.',
				'workswith' 	=> array('sidebar1', 'sidebar2', 'sidebar_wrap'),
				'folder' 		=> 'sidebars',
				'init_file' 	=> 'section.sb_tertiary.php',
				'icon'			=> CORE_IMAGES . '/admin/sidebar.png'
			);
	
		   parent:GDN__construct($name, $id, $settings);
	   }
	
	   function section_persistent() {
			$setup = pagelines_standard_sidebar($this->name, $this->settings['description']);
			register_sidebar($setup);
		}
	
	function section_template() {
		 	 pagelines_draw_sidebar($this->id, $this->name, 'template.dwidgets');?>
	
		<form action="" method="post" id="forums-search-form" class="dir-form">
				<h3><?php if ( is_user_logged_in() ) : ?>  <a href="#new-topic"><?php _e( 'Create New Topic', 'buddypress' ) ?></a><?php endif; ?></h3>
	
		</form>
		<?php }
	}
	
	/*
		End of section class
	*/


#24 cmunns

cmunns

    Advocate

  • Members

  • 6537 posts

Posted 16 November 2010 - 11:09 PM

That last `

#25 julesmoretti

julesmoretti

    Advanced Member

  • Members
  • PipPipPip
  • 75 posts

Posted 16 November 2010 - 11:27 PM

So that did not do it or I did not get what you suggested

This is what The script looks like now with no result
 <?php
	/*
	
		Section: Tertiary Sidebar
		Author: Andrew Powers
		Description: The main widgetized sidebar
		Version: 1.0.0
	
	*/
	
	class TertiarySidebar extends PageLinesSection {
	
	   function __construct( $registered_settings = array() ) {
	
			$name = __('Tertiary Sidebar', 'pagelines');
			$id = 'sidebar_tertiary';
	
			$settings = array(
				'description' 	=> 'A tertiary widgetized sidebar for the theme that can be used in standard sidebar templates.',
				'workswith' 	=> array('sidebar1', 'sidebar2', 'sidebar_wrap'),
				'folder' 		=> 'sidebars',
				'init_file' 	=> 'section.sb_tertiary.php',
				'icon'			=> CORE_IMAGES . '/admin/sidebar.png'
			);
	
		   parent:GDN__construct($name, $id, $settings);
	   }
	
	   function section_persistent() {
			$setup = pagelines_standard_sidebar($this->name, $this->settings['description']);
			register_sidebar($setup);
		}
	
	function section_template() {
		 	 pagelines_draw_sidebar($this->id, $this->name, 'template.dwidgets');?>
	
		<form action="" method="post" id="forums-search-form" class="dir-form">
				<h3><?php if ( is_user_logged_in() ) : ?>  <a href="#new-topic"><?php _e( 'Create New Topic', 'buddypress' ) ?></a><?php endif; ?></h3>
	
		</form>
		<?php
		}
	}
	
	/*
		End of section class
	*/


#26 bryan-hadaway

bryan-hadaway

    Advocate

  • Members
  • PipPipPipPipPip
  • 3697 posts

Posted 17 November 2010 - 05:52 AM

Forwarding for developer help. Thanks, Bryan

#27 arpowers

arpowers

    Founder

  • Administrators
  • 3271 posts

Posted 17 November 2010 - 07:20 AM

This is probably an issue with the `exec php` plugin. I'm guessing it doesn't like the `

#28 julesmoretti

julesmoretti

    Advanced Member

  • Members
  • PipPipPip
  • 75 posts

Posted 17 November 2010 - 07:36 AM

yes your right i removed the plugin. and now it shows up but at the bottom. How can i get it to the top?

#29 cmunns

cmunns

    Advocate

  • Members

  • 6537 posts

Posted 17 November 2010 - 05:31 PM

try putting the HTML form that was added before this line `pagelines_draw_sidebar($this->id, $this->name, 'template.dwidgets');?>`

#30 julesmoretti

julesmoretti

    Advanced Member

  • Members
  • PipPipPip
  • 75 posts

Posted 17 November 2010 - 05:56 PM

K so I have given it a go and Unfortunatly that did not work as expected.

Could you copy me more code that shows what it should be like:
 <?php
	/*
	
		Section: Tertiary Sidebar
		Author: Andrew Powers
		Description: The main widgetized sidebar
		Version: 1.0.0
	
	*/
	
	class TertiarySidebar extends PageLinesSection {
	
	   function __construct( $registered_settings = array() ) {
	
			$name = __('Tertiary Sidebar', 'pagelines');
			$id = 'sidebar_tertiary';
	
			$settings = array(
				'description' 	=> 'A tertiary widgetized sidebar for the theme that can be used in standard sidebar templates.',
				'workswith' 	=> array('sidebar1', 'sidebar2', 'sidebar_wrap'),
				'folder' 		=> 'sidebars',
				'init_file' 	=> 'section.sb_tertiary.php',
				'icon'			=> CORE_IMAGES . '/admin/sidebar.png'
			);
	
		   parent:GDN__construct($name, $id, $settings);
	   }
	
	   function section_persistent() {
			$setup = pagelines_standard_sidebar($this->name, $this->settings['description']);
			register_sidebar($setup);
		}
	
	function section_template() {
	
		<form action="" method="post" id="forums-search-form" class="dir-form">
				<h3><?php if ( is_user_logged_in() ) : ?>  <a href="#new-topic"><?php _e( 'Create New Topic', 'buddypress' ) ?></a><?php endif; ?></h3>  </form>
	
		 	pagelines_draw_sidebar($this->id, $this->name, 'template.dwidgets');?>
	
		 <?php
		}
	
	}
	
	/*
		End of section class
	*/


#31 cmunns

cmunns

    Advocate

  • Members

  • 6537 posts

Posted 17 November 2010 - 06:41 PM

Here is what I have from the function section_template all the way to the end of the file ` function section_template() { ?>

id, $this->name, 'template.dwidgets');?>

#32 julesmoretti

julesmoretti

    Advanced Member

  • Members
  • PipPipPip
  • 75 posts

Posted 17 November 2010 - 07:05 PM

That worked perfectly, and was much clearer for me to get. Thank you

#33 julesmoretti

julesmoretti

    Advanced Member

  • Members
  • PipPipPip
  • 75 posts

Posted 17 November 2010 - 07:07 PM

Ok so another request. Is there a way to trigger this script depending on what page we are. So If forum page then that button shows up. If group page then another script that says create group shows up? Thank you

#34 julesmoretti

julesmoretti

    Advanced Member

  • Members
  • PipPipPip
  • 75 posts

Posted 17 November 2010 - 07:15 PM

Oh and I forgot. Is there a way to have this button enabled and disabled depending on member status?

#35 julesmoretti

julesmoretti

    Advanced Member

  • Members
  • PipPipPip
  • 75 posts

Posted 17 November 2010 - 07:19 PM

Actually scratch the last message it does that already.

#36 cmunns

cmunns

    Advocate

  • Members

  • 6537 posts

Posted 17 November 2010 - 07:33 PM

hmm...here is a list of conditionals you could use http://codex.buddypr...-template-tags/ (examples on bottom, lemme know if you need help)

#37 julesmoretti

julesmoretti

    Advanced Member

  • Members
  • PipPipPip
  • 75 posts

Posted 18 November 2010 - 12:36 AM

So I tried with:

bp_is_group_forum()
bp_is_group_forum_topic()
bp_is_group_forum_topic_edit()

With no luck. This is the code that I was using:
 <?php
	/*
	
		Section: Tertiary Sidebar
		Author: Andrew Powers
		Description: The main widgetized sidebar
		Version: 1.0.0
	
	*/
	
	class TertiarySidebar extends PageLinesSection {
	
	   function __construct( $registered_settings = array() ) {
	
			$name = __('Tertiary Sidebar', 'pagelines');
			$id = 'sidebar_tertiary';
	
			$settings = array(
				'description' 	=> 'A tertiary widgetized sidebar for the theme that can be used in standard sidebar templates.',
				'workswith' 	=> array('sidebar1', 'sidebar2', 'sidebar_wrap'),
				'folder' 		=> 'sidebars',
				'init_file' 	=> 'section.sb_tertiary.php',
				'icon'			=> CORE_IMAGES . '/admin/sidebar.png'
			);
	
		   parent:GDN__construct($name, $id, $settings);
	   }
	
	   function section_persistent() {
			$setup = pagelines_standard_sidebar($this->name, $this->settings['description']);
			register_sidebar($setup);
		}
	
	function section_template() { ?>
	<?php if ( bp_is_group_forum() ) : ?>
		<form action="" method="post" id="forums-search-form" class="dir-form">
				<h3 align="center"><?php if ( is_user_logged_in() ) : ?>  <a href="#new-topic"><?php _e( 'Create New Topic', 'buddypress' ) ?></a><?php endif; ?></h3>
	
		</form><? endif; ?>
		<?php pagelines_draw_sidebar($this->id, $this->name, 'template.dwidgets');?>
	
		<?php }
	
	}
	
	/*
		End of section class
	*/


#38 bryan-hadaway

bryan-hadaway

    Advocate

  • Members
  • PipPipPipPipPip
  • 3697 posts

Posted 18 November 2010 - 07:52 AM

Forwarding to developer again to update them. Thanks, Bryan

#39 julesmoretti

julesmoretti

    Advanced Member

  • Members
  • PipPipPip
  • 75 posts

Posted 18 November 2010 - 07:27 PM

K thank you

#40 cmunns

cmunns

    Advocate

  • Members

  • 6537 posts

Posted 19 November 2010 - 12:50 AM

Here is what I have for the section template function and down and it works for me ` function section_template() { ?>

id, $this->name, 'template.dwidgets');?>