Hi, i have installed the module, all seem to work, but when I click on a topic, the post aren't showed in the right way, they're showed as in the "normal" forum module.

Can anyone help me?
thank

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Michelle’s picture

Category: support » bug

Shoot, I had someone else with this problem and thought it must be a fluke. I guess not. I'll try and figure it out ASAP but I'm heading out for this morning in a few minutes.

Michelle

dbm’s picture

FileSize
16.17 KB

Just commenting that I'm having the same problem and have attached a screenshot to show what it looks like.

Serso’s picture

So you say that there is something to decomment? In the template.php? I've modified this file so:

if (theme_get_setting('denver_themelogo'))
{
   function _phptemplate_variables($hook, $variables = array()) {
     if (module_exists('advanced_forum')) {
       $variables = advanced_forum_addvars($hook, $variables);
     }
     $variables['logo'] = base_path() . path_to_theme() . '/css/' . theme_get_setting('denver_style') . '/logo.gif';
     return $variables;
   }
}

if (theme_get_setting('denver_iepngfix')) {
   drupal_add_js(drupal_get_path('theme', 'denver') . '/js/jquery.pngFix.js', 'theme');
}

Do you think it's ok?
thank's for your replay

Michelle’s picture

Assigned: Unassigned » Michelle

No one said anything about "decommenting" that I can see. Your merge looks fine. There's something else wrong somewhere but I don't know what. I'm sorry, but I simply don't have the time to debug this in the next couple of days. I'll get to it as soon as I can.

Michelle

rvarkonyi’s picture

Hi guys!

I am having the same sort of problems with advanced forum. I am using Newsflash theme. The installation was ok, copied the module to sites/default/modules, copied "advforum" to themes/newsflash/.
Now I tried different modifications with the template.php, none of them works.

That's how it looks now:

if (theme_get_setting('newsflash_themelogo'))
{
  function _phptemplate_variables($hook, $variables = array()) {
    if (module_exists('advanced_forum')) {
      $variables = advanced_forum_addvars($hook, $variables);
    }
    $variables['logo'] = base_path() . path_to_theme() . '/images/' . theme_get_setting('newsflash_style') . '/logo.png';
    return $variables;
  }
} 

The general layout of the forum page changes partially only, the posts not at all.

Now unfortunately, my host is using php safe mode, gives a headache most of the times. My question is can that be my problem?

Thanks in advance!

Michelle’s picture

Could those of you having this problem install the sky theme and see if the forums are styled for you? The Sky theme has support for advanced forum built in so you don't need to change anything in the theme. Just have the module enabled.

The problem is that this is working for me on my test site as well as my main site which uses the sky theme so it's hard to debug. Knowing whether the sky theme works for you will help me track it down.

Thanks,

Michelle

rvarkonyi’s picture

Hi Michelle,

just tried with sky, the only difference for me is the user picture gets inline with the post text. No other user info or anything else.

Thanks

Jacine’s picture

FileSize
59.9 KB

Hello,

Did you guys modify your comment settings as instructed in the Advanced Forum module readme.txt file? Just wondering if that could be related...

See the attached screenshot for mine.

Thanks,
Jacine

Michelle’s picture

If you guys are up for a little more testing, I'd appreciate it.

1) Open the file forum-thread.tpl.php (found in themes/advforum)
2) Find the line print $content
3) Right before that write "THIS IS THE FORUM THREAD TPL"
4) Save it
5) Do a hard refresh on a forum thread page
6) Tell me if that text shows up and also if it shows up for both the node and the comments

If it doesn't, then the problem is that it isn't finding the template file. I suspect that's the problem as this started happening right after I change the name from node-forum.tpl.php to forum-thread.tpl.php. What I don't understand is why. I am explicitly setting the template file variable, not relying on PHPTemplate to auto discover it.

If it does show up then I'm even more confused. LOL

Thanks,

Michelle

Serso’s picture

Hi, I've tried to write that line and nothing changed in the forum pages!

Michelle’s picture

Ok, so it sounds like forum-thread.tpl.php isn't getting loaded, then. Hmmm...

Let's try this. In advanced_forum.module, find both instances of this line:

    $vars['template_file'] = "$forum_theme/forum-thread"; 

Right after that, in both places, put:

 print "Template file is: " . $vars['template_file'] . '<br>';

(Ignore the PHP tags. They are only there to format this post properly.)

Go to a forum thread. You should see one line printed up at the top of your screen for the node and for each comment on your thread and they should all say "Template file is: advforum/forum-thread".

If they don't, then that code isn't being called for some reason. If they do, then the problem is in the phptemplate engine somewhere.

Thanks for helping track this down,

Michelle

rvarkonyi’s picture

Hi Michelle,

unfortunately nothing seems to work, no message shows up nowhere. But just to make you a bit more confused, somehow with sky theme I could see something close to how it supposed to look. The user picture was in the middle, but all the other info and the layout was different than in the normal forum. Still not what it has to be, but at least something.

Thanks

rvarkonyi’s picture

Just another comment, with sky theme the "Template file is: advforum/forum-thread" is showing up at the top! But user picture is still in the middle.

Crooke

Michelle’s picture

Ok, so in the sky theme the right template file is being called but it still doesn't look right? Could you possibly take a screenshot of how it looks in sky?

What is theme you were trying to use it in before I asked you to try sky? Did you remember to add the function call to template.php?

This is a really bizarre bug. It seems to be acting different for different people.

Michelle

dgeilhufe@yahoo.com’s picture

OK, here is my experience:

(1) Using the NewsFlash theme, I experienced the problem of this thread... basically the node and comment templates don't show up/ get applied.

(2) In Newsflash the correct themeing gets applied at the forum and container level. But not the node/comment level.

(3) I installed both the NewsFlash and Sky theme. Sky theme works fine, I experienced no problems whatsoever.

(4) Applying the print statement above yields the following: Under sky, the print statement says it is loading the right template-- Template file is: advforum/forum-thread. Under NewsFlash, the print statement does not appear at all.

The NewsFlash theme has a lot of stuff going on (suckerfish menus, lots of regions, etc.) so I suspect there is some type of conflict going on.

I'm not a coder, but I can follow instructions if folks have ideas on how to debug :)

Michelle’s picture

Is everyone that's having troubles using Newsflash? If not, what themes are you using? Sorry to keep putting the testing back on you all but I have this on two different sites and they both work fine so it's really hard for me to debug.

I'll try installing newsflash myself and see if I can get it working. Won't be tonight, though, as it's 23:30 here. Hopefully tomorrow. I've got a pretty full plate but I want this module to be usable for people even though it's still in dev so I'll squeeze in as much time as I can.

Michelle

dgeilhufe@yahoo.com’s picture

Michelle- your efforts are awesome. Thank you.
I am more than willing to test/debug, least I can do.

dixieau’s picture

FileSize
63.49 KB
51.09 KB
65.08 KB

Hi Michelle

I am using newsflash 1.4 (green) and have tried all the above with no results.

I get a deprecating theme as you step through from forum > thread > comment ie
Main Forum page is good full theme working (font is white as per standard theme) *forum1*
Thread page loses it, newsflash theme font comes through although tables are there *forum_thread*
Comment page loses everything *forum_comment*

I had a hard time finding the forum-thread.tpl.php, turns out I hadn't upgraded to the latest update (I was still on 1.3), I have changed the advanced_forum.info to reflect 1.4 so I don't get confused when a new release comes out again.

For the record I just tested it on a clean install with Bluemarine and it works perfectly... forum > thread > comment.

However I also tested it on Garland and whilst the forum & thread work the comments didn't, although on the comments page it does show up the "Template file is: advforum/forum-thread" added earlier

Hope this helps you out Michelle as I really like the final look now that I have seen it!

rvarkonyi’s picture

FileSize
8.48 KB

Hi guys,

I've got totally the same screens coming up as dixieau, I'm using newsflash as well, call made in template.php just doesn't seem to work. For the sky theme I attach the screen I get, this time I disabled user picture in comments to see if it makes eny difference, but all user info gets to the middle of the comment and I noticed that the colours are not right.

Thanks all to your efforts Michelle to try sort this out!

Serso’s picture

thank'you for your efforts, now I'm using "denver" theme, but I'm actually having the same problem!

Michelle’s picture

Thanks to Heine for fixing the indenting. I didn't even notice before that you guys have your _phptemplate_variables wrapped in an IF:

if (theme_get_setting('newsflash_themelogo'))

Is that returning true? If it doesn't, the module won't work because it will never get called.

I really wish themes would standardize that function since there's no way around using it in D5. I can't wait for D6!

Michelle

Michelle’s picture

dixieau - It works on bluemarine and not garland?! But my test site is garland. Sigh.

I don't get what's going on. It seems as though phptemplate is sometimes ignoring the template file given. I wonder if this is a bug in phptemplate? Not willing to call it that without more digging, but it's a possibility.

I'll work on this some more soon as I'm able. Pretty swamped and the kids havent' been letting me work this morning.

Michelle

dgeilhufe@yahoo.com’s picture

The problem with newsflash is the if statement. You must check the themed logo option to have the advanced forum tpls work at the comment level. Tested and works perfectly.

Michelle’s picture

geilhufe - Thanks for confirming that. Once I noticed that extra if statement, I hoped that was the problem.

There was one having a problem on garland, though. Still need to find out what's up with that. :(

Michelle

rvarkonyi’s picture

FileSize
8.48 KB

Smashing!

Following your comments, I removed this line from my template.php:

if (theme_get_setting('newsflash_themelogo'))

Now, "Template file is: advforum/forum-thread" showing up on the top, advanced forum comes up in comment level, BUT the comment text and the user information are still in the middle of everything! :-)

I'll try to play around with the css, that might be the problem, although I haven't changed anything.

Thanks

Michelle’s picture

I think the problem with the stuff being in the middle is that the advforum CSS does not have priority. Since your theme's CSS is loaded after, it may have its own ideas about how classes should be themed. It's hard to say what's affecting it without being able to look at your site with firebug. If it's public, could you either post a link here or use my contact form?

Thanks,

Michelle

dixieau’s picture

FileSize
53.77 KB

okay, hours later ...:)

NEWSFLASH: Code as follows, just so there is no confusion I have covered a larger section,

$style = theme_get_setting('newsflash_style');
if (!$style)
{
   $style = 'blue';
}
drupal_add_css(drupal_get_path('theme', 'newsflash') . '/css/' . $style . '.css', 'theme');

if (theme_get_setting('newsflash_suckerfish')) {
   drupal_add_js(drupal_get_path('theme', 'newsflash') . '/js/suckerfish.js', 'theme');
   drupal_add_css(drupal_get_path('theme', 'newsflash') . '/css/suckerfish_'  . $style . '.css', 'theme');
}

if (theme_get_setting('newsflash_iepngfix')) {
   drupal_add_js(drupal_get_path('theme', 'newsflash') . '/js/jquery.pngFix.js', 'theme');
}

   function _phptemplate_variables($hook, $variables = array()) {
  if (module_exists('advanced_forum')) {
    $variables = advanced_forum_addvars($hook, $variables);
  return $variables;  
}
     $variables['logo'] = base_path() . path_to_theme() . '/images/' . theme_get_setting('newsflash_style') . '/logo.png';
     return $variables;
   }

if (theme_get_setting('newsflash_uselocalcontent'))
{
   $local_content = drupal_get_path('theme', 'newsflash') . '/' . theme_get_setting('newsflash_localcontentfile');
	 if (file_exists($local_content)) {
	    drupal_add_css($local_content, 'theme');
	 }
}

GARLAND The problem was I wasn't changing that last array into a var

/**
 * Override or insert PHPTemplate variables into the templates.
 */
function _phptemplate_variables($hook, $vars) {
  if (module_exists('advanced_forum')) {
    $vars = advanced_forum_addvars($hook, $vars);
  }
  if ($hook == 'page') {

    if ($secondary = menu_secondary_local_tasks()) {
      $output = '<span class="clear"></span>';
      $output .= "<ul class=\"tabs secondary\">\n". $secondary ."</ul>\n";
      $vars['tabs2'] = $output;
    }

    // Hook into color.module
    if (module_exists('color')) {
      _color_page_alter($vars);
    }
    return $vars;
  }
  return $vars;
}

Thanks to those few posts above! What a collaborative effort :) Not sure how the change in newsflash will impact on other things, but it doesn't seem to be affecting me, I do have a post on the http://www.roopletheme.com/forum/index.php?topic=353.0 asking how to merge so we will see how it differs, but at least mine is working.

Michelle, is there a way to limit the size of the forum/comment ? As it is, it is going to take up a mammoth amount of room on a page for 1 or 2 lines, image attached.

Thanks

dixieau’s picture

aha, crooke discovered what is happening with yours..

You need to enable "user pictures in posts" & "user pictures in comments" at admin/build/themes/settings/newsflash

Found this out while fiddling, goodluck

EDIT:
Actually what causes the problem in crookes image where the post info drops into the message part is NOT listing a default image to use at admin/user/settings

Is there a way can disable this so that an image is not necessary as I don't particularly want images on posts?

Michelle’s picture

Thanks for the update. Yeah, Garland not returning $vars except for the page hook is annoying. I've included the template.php for garland with the module. Will do the same for newsflash once we've got it well sorted.

The height of the posts/comments are set in advanced_forum-structure.css. It's line 142 on my copy but I've fiddled with the CSS since the last commit. Look for:

.forum-post-wrapper {
border-bottom:thin solid black;
border-top:thin solid black;
min-height:24em;
}

That min-height is there to make it big enough to contain all the "stuff" like icons and such because images like popping out of divs. Just play with the number to get it to what you want. If any CSS guru out there has a better suggestion, I'd love to hear it. I'm a coder, not a designer. :) CSS gives me hives. LOL

Thanks for the testing,

Michelle

colorado’s picture

I have 2 thoughts:

1) Is everyone here clearing their site cache (i.e. using the Devel Module) as well as their browser cache after installing and/or enabling the Advanced Forum Module or switching between themes?

2) The Theme Settings API is used in both Denver and Newsflash themes. That may be related.

3) The Denver theme requires that the CSS Aggregator be enabled in the site settings. Styling can look strange otherwise.

If I think of any more ideas I'll come back here and post them...

colorado’s picture

As the developer of the Denver theme, does anyone have any thoughts or ideas if/what I may change in the Denver theme to avoid this problem?

Thank you all for your efforts and comments.

colorado

rvarkonyi’s picture

FileSize
18.57 KB

Hi Michelle, dixieau,

thanks to your reply. Firebug is enabled and I don't see any other css entries that could affect the positioning. That's what it says
.forum-comment-left {
float:left;
line-height:110%;
width:150px;
}

For some reason it doesn't float to left. If I say "float:none" than it gets to the good position, the forum topic line remains in the right column but drops down under the left column, which is obviuos.
If you have some time and want to have a look, I appreciate it, http://crooke.extra.hu/?q=node/73

dixieau - User pictures in posts & comments are enabled by default, I just disabled them to see if that makes any difference. Unfortunately no luck. Left column only floats to left if float is none, but then it breaks the structure.

Screenshot attached, thanks everyone for the help!

rvarkonyi’s picture

Hey!

Semms like I got it!

With some modifications, my css looks like that:

.forum-comment-left {
clear:left;
float:left;
line-height:110%;
margin-left:0px;
width:150px;
}

.forum-comment-right {
float:right;
width:461px
}

Not sure why I had to make this, but it works now, so thank you all for your support!

crooke

Serso’s picture

Thank'you for all! I've solved the problem also with denver theme, I've made the same things like Newsflash themes!

I've modified the template.php of denver like this:

{
function _phptemplate_variables($hook, $variables = array()) {
if (module_exists('advanced_forum')) {
$variables = advanced_forum_addvars($hook, $variables);
return $variables;
}
$variables['logo'] = base_path() . path_to_theme() . '/css/' . theme_get_setting('denver_style') . '/logo.gif';
return $variables;
}
if (theme_get_setting('denver_iepngfix')) {
drupal_add_js(drupal_get_path('theme', 'denver') . '/js/jquery.pngFix.js', 'theme');
}
}

rastarr’s picture

FileSize
26.63 KB

Hmm, I'm not sure what I've done here - pls check attached for profile bits bleeding across to the right into forum content. I've got pics enabled as indicated above.
This is using Newsflash theme.

Also has anyone using Newsflash sorted the colours to match the theme ? Perhaps let us know that fix as well if time allows

dgeilhufe@yahoo.com’s picture

rastarr- the fix is in comment 33 above. Modify the CSS file.

roaming’s picture

rastarr

In Newsflash, there are two files that you can modify to change colors to your taste.

In "style.css", (which is at: newsflash014/themes/newsflash/style.css) the forum section is from lines 361 to 388 (that's at the bottom of the file).

In "blue.css" or whatever newsflash template you picked (in: newsflash014/themes/newsflash/css/blue.css), the major changes you can make are "body" (line 1), "header" (line 56) and "sidebar background colors" (line 61).

Some changes can also be made in Advanced Forum, at: advanced_forum/themes/advforum/advanced_forum.css.

If you change a "background-color", make sure to have a "color" (that would be the font) of a color that's readable with the new background.

dgeilhufe@yahoo.com’s picture

Potentially simpler ccs mod for the layout issue in comment 35 & 32.

Add a single clear statement to the forum-post-wrapper css. I suspect a clear:both is better than a clear:left in terms of avoiding future conflicts with different themes.

The current advanced_forum-structure.css is

.forum-post-wrapper {
        min-height: 24em;
        border-top: thin solid black;
        border-bottom: thin solid black;
}

becomes

.forum-post-wrapper {
        clear: both;
        min-height: 24em;
        border-top: thin solid black;
        border-bottom: thin solid black;
}
Michelle’s picture

Thanks for the CSS tip. I'm not very good at CSS. I'm taking a short (< a week) break from my modules to try and catch up on a client site but then will get back to this and get the CSS fix committed.

Michelle

Michelle’s picture

Status: Active » Fixed

Looks like everything is settled and I added the clear:both.

Michelle

hedac’s picture

mmmm it fixed it for FF, but not in IE6...

Michelle’s picture

I test in FF, Opera, and IE 7. I'm not willing to wrestle with IE 6 for a module I'm doing for free. If someone wants to submit patches for IE 6 fixes, I'll use them, but I don't have the time to deal with that sucky browser.

Michelle

Hinode’s picture

Component: Miscellaneous » Code
Assigned: Michelle » Hinode
Category: bug » task
Status: Fixed » Active

Hi Michelle,

My "pseudo" nick RedShif was not available for register, then, now I am Hinode.

Ten day into Drupal, certainly not a reasonable time: I know nothing about it. And PHP too. Resuming, just feeling about to wake up and seeing nothing more resamble the time when I like to code (?) some traquinagens. All to say that: I write some code (?) that maybe indicate one solution to fix IE6 issue, at least one that mess up the forum layout. Look...

advanced_forum-structure.css, line 114:

.forum-post-wrapper {
  min-height: 24em;
  border-top: thin solid black;
  border-bottom: thin solid black;
}

The min-height is not IE6 suported. Then...

.forum-post-wrapper {
  height: 24em;
  border-top: thin solid black;
  border-bottom: thin solid black;
}

save above into a file called advanced_forum-structure_fix-ie6.css and put it in your css's house. To call it, I create the following function in advanced_forum_module file:

function getBrowserID() {
    static $browser_id = array();
	
    if(!isset($browser_id[0])){
                          $browser = get_browser($_SERVER['HTTP_USER_AGENT']);
		foreach ($browser as $name => $value) {
			if ($name == "browser") {
				$browser_id[] = $value;
			} else if ($name == "majorver") {
				$browser_id[] = $value;
			}
		}
	}
	
	return implode("", $browser_id);

}

and change the advanced_forum_add_css function (same file, line 185):

function advanced_forum_add_css($forum_theme) {

  // Find the path to the current theme
  $theme_path = path_to_theme();
  
  // Load the structural CSS (heights, floats, padding, margins, etc)
  drupal_add_css(path_to_theme() . '/' . $forum_theme . '/advanced_forum-structure.css');
  
  // Add on the colors and graphics part
  drupal_add_css(path_to_theme() . '/' . $forum_theme . '/advanced_forum.css');
}

to include some bits to make the call (around "//Load the IE6 patch for structural CSS")

function advanced_forum_add_css($forum_theme) {

  // Find the path to the current theme
  $theme_path = path_to_theme();
  
  // Load the structural CSS (heights, floats, padding, margins, etc)
  drupal_add_css(path_to_theme() . '/' . $forum_theme . '/advanced_forum-structure.css');

  //Load the IE6 patch for structural CSS
  if ("IE6" == getBrowserID()) {
    drupal_add_css(path_to_theme() . '/' . $forum_theme . '/advanced_forum-structure_fix-ie6.css');
  }
  // Add on the colors and graphics part
  drupal_add_css(path_to_theme() . '/' . $forum_theme . '/advanced_forum.css');
  
}

Maybe an insane solution, but... you don't teach me how....

One more thing. I deleted a line that load the image "paper.gif" (advanced_forum.css, line 95) cause that image seems too anoying to me and was overlaping the title a little.

original:

.post-info {
  background: #247AB1 url(images/paper.gif) no-repeat fixed left;
  color:white;
}

deleted:

.post-info {
  background: #247AB1;
  color:white;
}

Okay ?

santan’s picture

Hi there Michelle,

I'm trying to install the advanced forum in the multiflex theme. I have follow all the steps, and finally I got everything OK, except that the coments are at the bottom of the box. I still don't know how to fix it. Could you give me some help with it?

I also have a VERY BIG PROBLEM with this module. Every field that I have added in profiles, is not visible when I enable the advanced forum module. Do you know why?

Thanks in advance for your help, and thanks a lot for this wonderful module.

Santan

Michelle’s picture

hinode - That is a really complex solution to get around a lack of min-height. I'm going to wait and see what the designer working on the theme comes up with.

Santan - I don't use that theme and, honestly, I suck at CSS. I suggest you file an issue in that queue. I don't understand what you mean about profile fields not being visible. Advforum doesn't touch the user view page at all. Also, in the future, please file a new issue for new problems to make them easier to track.

Michelle

Michelle’s picture

Assigned: Hinode » Unassigned
Status: Active » Fixed

Simpler fix in http://drupal.org/node/212674

Michelle

Anonymous’s picture

Status: Fixed » Closed (fixed)

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