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

michelle’s picture

Status: Active » Postponed (maintainer needs more info)

It means it's not finding the template file. Did you copy the whole style directory to your theme?

Michelle

jtAx’s picture

Sorry, 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.

michelle’s picture

No, 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

jtAx’s picture

Hmmm... 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

jtAx’s picture

Thanks Michelle....it is working fine now

michelle’s picture

Status: Postponed (maintainer needs more info) » Fixed

Cool. :)

Michelle

Triskelion’s picture

I 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.

michelle’s picture

@triskelion: Just use 5.18.

Michelle

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.