Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Embeding a forum
#1
Hello. I am new to Get Simple and PHP generally.

I have cobbled together a website: http://grognard.net

As you can see I have a page called Community. I want to embed a punbb forum in to that page in the same way it is done here at this site. The forum is installed to http://grognard.net/forum and ready to rock.

I've done some googling and poking about in the files and I think I understand how it works (kinda). I'm just confused how I call the forum using php on the Community page.

Can someone help me out? I'd love to have my forum embedded and looking like it does here.
Reply
#2
Ok whilst waiting for a reply here I did some more digging and found this tip:

Create an additional template file for the used theme (copy template.php and rename it), place the events list call into the new template file (above, below <?php get_page_content(); ?> or replace it) and assign it to a given page (in page options)

I have the Exec-PHP plugin intalled so that would work also by letting me call the board directly using the page editor?

That sounds like the way to go?
Reply
#3
Avoid using that plugin, your best bet is to use a blank page set to your template.

You could also stick the file in your base directory and use it like that but its hard to incorporate using the menu system.

Use a component if you want php control inside of getsimple.

get_component('name');
in your template.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#4
Hey thanks for the quick reply.

I will take your advice and use a blank page set to my template.

The thing is, I don't understand what I have to put in to that template to get the punbb forum to load on that particular page. All css/style stuff aside, how do I accomplish the basic bit?

Here's my template file (a copy of the main site template):

Code:
<?php if(!defined('IN_GS')){ die('you cannot load this page directly.'); }
?>

<head>
        <title><?php get_page_clean_title(); ?> | <?php get_site_name(); ?>, <?php get_component('tagline'); ?></title>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
        <?php get_header(); ?>
        <meta name="robots" content="index, follow" />
        <link rel="stylesheet" type="text/css" href="<?php get_theme_url(); ?>/default.css" media="all" />
      
</head>

<body id="<?php get_page_slug(); ?>" >
<div id="wrapper">



<div id="header">
<h1 id="inline"><a class="logo" href="<?php get_site_url(); ?>"><?php get_site_name(); ?></a></h1>
<span class="tagline"><?php get_component('tagline'); ?></span>
</div><!-- end div#header -->



<div id="navigation">
<ul id="nav">
<?php get_navigation(return_page_slug()); ?>
</ul>
</div><!-- end div#nav -->



<div id="content">
<h2><?php get_page_title(); ?></h2>

<?php get_page_content(); ?>

<p id="permalink">
<strong>Permalink:</strong> <?php get_page_url(); ?><br />
<strong>Last Saved:</strong> <?php get_page_date('F jS, Y'); ?>
</p>
</div><!-- end div#content -->

<div id="footer">
<p class="left-footer">Content &copy; <?php echo date('Y'); ?> <?php get_site_name(); ?></p>
</div><!-- end div#footer -->


</div><!-- end div#wrapper -->
</body>
</html>

I'm guessing I need to add in a call to the forum somewhere before or after <?php get_page_content(); ?>? or instead of it?
Reply
#5
Instead of it probably, and youll need to figure out how to pass its arguments in and out.

Youll have to reference your forum software to figure out that part.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply




Users browsing this thread: 1 Guest(s)