I have installed Advanced Forum and Advanced Profile according to the full directions here: http://drupal.org/node/227108

Here are my issues:
My forums do not show the User Information
My forums view is not as expected... please check them out to see what I mean
In Firefox, the Marked all Red button is to the right of the Forums.. and the Post new Forum Topic is to the right... Not above as they should be.

Please help. I've been backwards and forwards in all the documentation. I'm assuming it's a View issue. I've also gone over permissions.

My site:
http://danricreations.com/drupal/forum

Thanks. I am new to Drupal but I've setup many phpBB and phpNuke sites. Many years as a professional in IT as well.

CommentFileSizeAuthor
#4 template.php_.txt3.85 KBClaari
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Claari’s picture

Version: 5.x-1.x-dev » 5.x-1.0-alpha2
Michelle’s picture

Status: Active » Postponed (maintainer needs more info)

Can you confirm you added the function call to _phptemplate_variables()? The look of your site is typical of that not being added.

Michelle

Claari’s picture

I did... here is my actual template.php as it is now. I did change the $vars to $variables as it was in the function of my theme.. which is newsflash.

<?php
// $Id: template.php,v 1.2 2007/08/23 10:26:18 roopletheme Exp $

if (is_null(theme_get_setting('newsflash_style'))) {
global $theme_key;
// Save default theme settings
$defaults = array(
'newsflash_style' => 0,
'newsflash_width' => 0,
'newsflash_fixedwidth' => '850',
'newsflash_breadcrumb' => 0,
'newsflash_iepngfix' => 0,
'newsflash_themelogo' => 0,
'newsflash_fontfamily' => 0,
'newsflash_customfont' => '',
'newsflash_uselocalcontent' => 0,
'newsflash_localcontentfile' => '',
'newsflash_leftsidebarwidth' => '210',
'newsflash_rightsidebarwidth' => '210',
'newsflash_suckerfish' => 0,
'newsflash_usecustomlogosize' => 0,
'newsflash_logowidth' => '100',
'newsflash_logoheight' => '100',
);

variable_set(
str_replace('/', '_', 'theme_'. $theme_key .'_settings'),
array_merge(theme_get_settings($theme_key), $defaults)
);
// Force refresh of Drupal internals
theme_get_setting('', TRUE);
}
function newsflash_regions() {
return array(
'suckerfish_menu' => t('suckerfish menu'),
'sidebar_left' => t('left sidebar'),
'sidebar_right' => t('right sidebar'),
'content_top' => t('content top'),
'content_bottom' => t('content bottom'),
'header' => t('header'),
'user1' => t('user1'),
'user2' => t('user2'),
'user3' => t('user3'),
'user4' => t('user4'),
'user5' => t('user5'),
'user6' => t('user6'),
'footer' => t('footer')
);
}

$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');
}

if (theme_get_setting('newsflash_themelogo'))
{
function _phptemplate_variables($hook, $variables = array()) {
if (module_exists('advanced_profile')) {
$vars = advanced_profile_addvars($hook, $variables);
}
if (module_exists('advanced_forum')) {
$vars = advanced_forum_addvars($hook, $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');
}
}

function phptemplate_menu_links($links, $attributes = array()) {

if (!count($links)) {
return '';
}
$level_tmp = explode('-', key($links));
$level = $level_tmp[0];
$output = "

    \n";

    $num_links = count($links);
    $i = 1;

    foreach ($links as $index => $link) {
    $output .= '

  • $output .= ' class="';
    if (stristr($index, 'active')) {
    $output .= 'active';
    }// frontpage AND current-link in menu is
    elseif((drupal_is_front_page()) && ($link['href']=='')){
    $link['attributes']['class'] = 'active';//add class active to

  • $output .= 'active';//add class active to }
    if ($i == 1) {
    $output .= ' first'; }
    if ($i == $num_links) {
    $output .= ' last'; }

    $output .= '"';

    $output .= ">". l($link['title'], $link['href'], $link['attributes'], $link['query'], $link['fragment']) ."

    \n";

    $i++;
    }
    $output .= '

';
return $output;
}

Claari’s picture

FileSize
3.85 KB
Michelle’s picture

Ok, so you have:

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

Two things I see:

1) You aren't returning $vars so the function calls aren't doing anything. Doesn't matter if you use $vars or $variables but you have to be consistant.

2) If theme_get_setting('newsflash_themelogo') doesn't return true, this won't run.

Michelle

Claari’s picture

I caught #1 before you answered.. and have now fixed #2. The forums are better. My only issue now is Avatars are not showing

Thanks for all your help.. and the quick responses!

Michelle’s picture

On alpha 2, you need to make sure you have show pictures in posts/comments checked in your theme config.

Michelle

Claari’s picture

I did have that enabled on my theme but it didn't start showing the Avatars until I also checked that in the Global settings. Weird, I understood that theme settings overwrite the global settings.

In any case it's working now. Thanks so much for you help :)

Michelle’s picture

Status: Postponed (maintainer needs more info) » Fixed

Yeah, you'd think the specific theme settings would override that. Anyway, glad it's working now.

Michelle

Anonymous’s picture

Status: Fixed » Closed (fixed)

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