Hello all,
First off, I tried searching through this forum to find a simple solution to my question but alas, I found nothing that I was able to understand. Please excuse my ignorance, but I am a brand newbie to the Drupal community, and not very much of a programmer. However, I do have a limited knowledge of PHP coming from the PostNuke world.
I am trying to follow this tutorial located here:
http://www.drupalart.org/phpbb
I've gotten everything setup as far as the php-template theme, and I have template.php already. But where I get stuck is when it says, "If you already have a template.php file, simply merge this code with the other php code you might have in the file."
For the past few hours, this has not been a simple task for me. I really don't know how to begin with merging these two files.
I just try to keep putting the code in places I think it might fit and I receive error messages such as this one:
Fatal error: Cannot redeclare _phptemplate_variables() (previously declared in /home/threeone/public_html/d/themes/civicspace/template.php:250) in /home/threeone/public_html/d/themes/civicspace/template.php on line 893
I don't want to give up on Drupal because I think it looks very promising in the things it can do and I am trying my best to learn it.
So if anyone knows how to at least, point me in the right direction that would be greatly appreciated.
Thanks much!
txcrew
Comments
When you add code to the
When you add code to the template.php file, you just paste the code AFTER the code thats in there. You don't need to insert it within the existing code.
I do remember reading something about reseting a variable or something at the begining of each php code snippit when you have more than one. I think it was posted by Dublin Drupaler. Maybe someone else can comment on this.
Just tried that and the
Just tried that and the result was this:
edit:removed live url
Please let me know what you think
So, perhaps my question
So, perhaps my question should be...
How can you merge the flatforum into Civicspace theme.
Thanks.
Just to follow up, I
Just to follow up, I answered txcrew's question through email (I also wrote that phpbb tutorial).
Basically you just need to merge the code as follows:
BEFORE:
AFTER:
Also, please note that the tutorial linked above was tested on the phptemplate box_grey theme. The CivicSpace theme may try and override the CSS used in the tutorial. So if you follow the tutorial and it doesn't work with your theme check it with box grey to see if that is the cause. Good luck!
-zirafa
how to add flatforum's _phptemplate_variables to template.php?
I can't figure out how to combine flatforum's template.php and multiflex's template.php. I've thoroughly searched on this topic, and can't find a usable document.
Any chance somebody could provide a usable template.php that integrates the flatforum _phptemplate_variables ?
I'm using drupal 4.7.3 and flatforum for 4.7 and the multiflex theme. I tried to join them myself (listed below) - I don't get any errors but flatforum still not working... I get the same old regular forum. What am I doing wrong?
Here's my template.php:
I'm wondering this as well (Multiflex)
I don't know an awful lot about php but I've tried everything that I've read so far and it kills my entire site. IF anyone can figure out how to merge the templates.php for the Multiflex theme that'd be awesome.
doesn't work
I pasted the new code to merge with the template.php file it follows the suggested format
Any idea why it doesn't work, I still get
line 393 is where the new code starts at //$Id. This is a clip of what the transition looks like.
...
...
--
Arif Jinha
CIHAD uottawa
www.uottawaglobe.ca
what worked
What ended up working is removing the "function_phptemplate_variables ..." of the code that will be merged, and just started with "static_$is forum" in the variables section.
I'm no programmer, but what this seems to do is avoid the line which 'redeclares' variables and includes the variables in that section of code (the next section in my template.php is 'custom navigable links'.)
Looks like this.
The next section of the orginal template.php begins with
It seems to be working!
--
Arif Jinha
CIHAD uottawa
www.uottawaglobe.ca