I am using Drupal 5.18
So does this error code tell me I need to do the adjustments to php template, or that I have simply installed the module improperly?
~~~~~~
phptemplate.engine was instructed to override the advf_forums theme function, but no valid template file was found.
Comments
Comment #1
michelleIt means it's not finding the template file. Did you copy the whole style directory to your theme?
Michelle
Comment #2
jtAx commentedSorry, I had only copied over the specific style I wanted. So I copied the entire directory and after I copied it, now I get this error:
file_get_contents(sites/all/themes/tapestry/boxy/advanced_forum.css) [function.file-get-contents]: failed to open stream: No such file or directory in /home/sitename/public_html/includes/common.inc on line 1644.
Comment #3
michelleNo, no. Not all the styles, just the style directory that you want. So it should be like "sites/all/themes/tapestry/boxy" with all the files inside of "boxy"
Michelle
Comment #4
jtAx commentedHmmm... that's the way I thought I had loaded it the first time. I will go back through again and change the directories.
From what little I know, it does appear that the Tapestry theme supports Advanced Forums though
Comment #5
jtAx commentedThanks Michelle....it is working fine now
Comment #6
michelleCool. :)
Michelle
Comment #7
Triskelion commentedI have been struggling with the D6 backport to D5 under Newsflash (talk about being a glutton for punishment) and I discovered that there is a basic reason why the module will not function in D5.17. It is not compatible with PHPtemplate!
In your calls to _phptemplate_callback() you pass an array of suggestions for template files. Each suggestion is prefixed with the directory name of the forum theme (naked, boxy etc) of the form "$forum_style/advf-forums" etc, which would give "boxy/advf-forums" as the suggestion.
However, just before _phptemplate_callback() checks your suggestion, it executes $suggestion = str_replace(array("/", "\\", "\0"), '', $suggestion), a windows security hack, which strips the directory separator out of your suggested file path, and leaves you with "boxyadvf-forums", which of course is not found. The only earlier copy I still have is D5.7, which did not have this hack in PHPtemplate.
The key is in the error message quoted in the original post. "advf_forums" is the hook name, the file name being "advf-forums". I have seen a number of posts since 2007 quoting this error, and I suspect that you are about to see some more. This time it is a core problem.
My solution (not being hosted on windows) is to comment out the two str_replace lines in _phptemplate_callback(), and the advanced_forum module works fine again.
BTW, nice backport, now that I have it working.
Comment #8
michelle@triskelion: Just use 5.18.
Michelle