vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced CMPS > vBa CMPS v1.x (Archive - Closed for Posting) > Troubleshooting / "How do I..." Questions

 
 
Thread Tools Display Modes
  #1  
Old 08-31-2004, 08:28 PM
indie indie is offline
Senior Member
 
Join Date: Aug 2004
Posts: 169
Default not working

Hi:
In the cmps, I changed the name of "news archive" to what I wanted, and it still says "news archive" on the portal. what happened, does this not work? In theCP it reflects the name I saved. thx
  #2  
Old 09-01-2004, 12:37 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: not working

There shouldn't be any reason why it wouldn't work... Did you perhaps change it in the wrong language?
  #3  
Old 09-01-2004, 07:59 PM
indie indie is offline
Senior Member
 
Join Date: Aug 2004
Posts: 169
Default Re: not working

Hmm, i don't even see what you mean. I just got to "edit modules". and I click on the "news archive" module. Then, in the 1st box, I change News Archive to my custom text. It saves the text in the cmps, and appears in the menu of the cmps modules, but on my forum, the module still says News Archive. thanks

Is it possible that in the code for the home page, News Archive is permenately there, so it would have to be changed by hand?

thanks

Last edited by indie; 09-01-2004 at 08:06 PM.
  #4  
Old 09-01-2004, 08:03 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: not working

You have to change it in either the template (adv_portal_news_archive), or the phrase (news_archive).
  #5  
Old 09-01-2004, 08:11 PM
indie indie is offline
Senior Member
 
Join Date: Aug 2004
Posts: 169
Default Re: not working

cool thanks. If I wanted to add another news module that I actually used for news, could I do that? How would I add it again? And if this is the case, which of the above would i chage so it wouldnt affect the 1st news mudule title that i am using for custim content.
PS, isnt there code I can enter that will reflect the name of the module?thanks

Last edited by indie; 09-01-2004 at 08:23 PM.
  #6  
Old 09-09-2004, 01:41 PM
indie indie is offline
Senior Member
 
Join Date: Aug 2004
Posts: 169
Default Re: not working

Do you think in 2.0 changing it in the cp will change it in the module? that would be great. thanks!
  #7  
Old 09-09-2004, 02:05 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: not working

Possibly.
  #8  
Old 09-16-2004, 08:34 AM
-peace- -peace- is offline
Member
 
Join Date: Jul 2004
Location: Chicago
Posts: 72
Default Re: not working

Mine is not working either.

Here is the codes:

Module Title: News Archive
Module Identifier: newsarchive
File to Include: news.php
Templates Used: none

Code:
adv_portal_news_archive
<!-- News Archive -->

	<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
		<tr>
			<td class="tcat" <if condition="$mods['modcol'] == 1"> colspan="5"</if>>$vba_options[portal_blockbullet] <span class="smallfont"><strong>$vbphrase[news_archive]</strong></span></td>
		</tr>
	<if condition="$mods['modcol'] == 1">
		<tr>
			<if condition="$vba_options['portal_news_showicon']">
				<td class="thead" width="15">&nbsp;</td>
			</if>
			<td class="thead" width="100%"><span class="smallfont">$vbphrase[title_username_date]</span></td><td class="thead" width="15"><span class="smallfont">$vbphrase[replies]</span></td><td class="thead" width="15"><span class="smallfont">$vbphrase[views]</span></td>
		</tr>
	</if>
		$newsarchivebits
	
	</table>
	<br />
	
<!-- End News Archive -->

Code:
News.php

<?php
// ++=========================================================================++
// || vBadvanced CMPS 1.0.0                                                   ||
// || © 2003-2004 vBadvanced.com & PlurPlanet, LLC - All Rights Reserved      ||
// || This file may not be redistributed in whole or significant part.        ||
// || http://vbadvanced.com                                                   ||
// ++ ========================================================================++

foreach ($modules AS $omods)
{
	if ($omods['identifier'] == 'news' AND in_array($omods['modid'], explode(',', $pages['modules'])))
	{
		$shownews = true;
		$newsid = $omods['modid'];
	}
	if ($omods['identifier'] == 'newsarchive' AND in_array($omods['modid'], explode(',', $pages['modules'])))
	{
		$showarchive = true;
		$archiveid = $omods['modid'];
		$mods['modcol'] = $omods['modcol'];
		$mods[$archiveid]['displayorder'] = $omods['displayorder'];
	}
}

unset($omods);

if ($vba_options['portal_news_forumid'])
{
	if ($vba_options['portal_news_maxposts'])
	{
		if ($vba_options['portal_news_maxposts'] AND $vba_options['portal_news_enablearchive'])
		{
			$limit = $vba_options['portal_news_maxposts'] + $vba_options['portal_news_enablearchive'];
		}
		else
		{
			$limit = $vba_options['portal_news_maxposts'];
		}
		$newslimit = 'LIMIT ' . $limit;
	}

	$foruminfo['allowratings'] = $vba_options['portal_news_showrating'];

	$counter = 0;

	$getnews = $DB_site->query("
			SELECT " . iif($vba_options['portal_news_showrating'], 'IF(votenum >= ' . $vboptions['showvotes'] . ', votenum, 0) AS votenum, IF(votenum >= ' . $vboptions['showvotes'] . ' AND votenum != 0, votetotal / votenum, 0) AS voteavg,') . "
			thread.threadid, thread.title, replycount, postusername, postuserid, thread.dateline AS postdateline, thread.lastposter, thread.lastpost, IF(views<=replycount, replycount+1, views) AS views, forumid, post.postid, pagetext, allowsmilie
			" . iif ($vba_options['portal_news_showsignature'], ', showsignature, usertextfield.signature') . "
  		" . iif ($vba_options['portal_news_showicon'] , ',thread.iconid AS threadiconid, iconpath AS threadiconpath') . " 
  		" . iif ($vba_options['portal_news_showavatar'] , ', avatarpath, NOT ISNULL(avatardata) AS hascustom, customavatar.dateline AS avatardateline, avatarrevision') . " 
  		" . iif ($vba_options['portal_news_showsubscribed'] AND $bbuserinfo['userid'] , ', NOT ISNULL(subscribethread.subscribethreadid) AS subscribed ') . " 
  		" . iif ($vba_options['portal_news_showattachments'], ', attachment.filename, attachment.filesize, attachment.visible, attachmentid, counter, thumbnail, LENGTH(thumbnail) AS thumbnailsize') . "
			FROM " . TABLE_PREFIX . "thread AS thread
			LEFT JOIN " . TABLE_PREFIX . "post AS post ON (post.postid = thread.firstpostid) 
  		" . iif ($vba_options['portal_news_showicon'] , 'LEFT JOIN ' . TABLE_PREFIX . 'icon USING (iconid)') . " 
  		" . iif ($vba_options['portal_news_showattachments'] , 'LEFT JOIN ' . TABLE_PREFIX . 'attachment AS attachment ON (post.postid = attachment.postid)') . " 
			" . iif ($vba_options['portal_news_showavatar'] OR $vba_options['portal_news_showsignature'], 
				'LEFT JOIN ' . TABLE_PREFIX . 'user AS user ON (user.userid = post.userid)
			') . "
			" . iif ($vba_options['portal_news_showsignature'], 'LEFT JOIN ' . TABLE_PREFIX . 'usertextfield AS usertextfield ON (post.userid = usertextfield.userid)') . "
  		" . iif ($vba_options['portal_news_showavatar'] , '
				LEFT JOIN ' . TABLE_PREFIX . 'avatar as avatar ON (avatar.avatarid = user.avatarid)
				LEFT JOIN ' . TABLE_PREFIX . 'customavatar as customavatar ON (customavatar.userid = user.userid)
			') . " 
  		" . iif ($vba_options['portal_news_showsubscribed'] AND $bbuserinfo['userid'] , ' LEFT JOIN ' . TABLE_PREFIX . 'subscribethread AS subscribethread ON (subscribethread.threadid = thread.threadid AND subscribethread.userid = \'' . $bbuserinfo['userid'] . '\')') . " 
			$deljoin
			WHERE forumid IN($vba_options[portal_news_forumid]) AND thread.visible = 1 AND thread.open != 10 $notdeleted
			GROUP BY post.postid
			ORDER BY " . iif($vboptions['stickynewsthreads'], 'sticky DESC,') . " postdateline DESC" . iif($vboptions['shownewsattach'], ', attachmentid') . " 
			$newslimit");
	while ($news = $DB_site->fetch_array($getnews))
	{
		$counter++;

		if ($vba_options['portal_news_archivepreview'])
		{
			$news['preview'] = $news['pagetext'];
		}

		$dateposted = vbdate($vba_options['portal_news_dateformat'], $news['postdateline']);
		$news = process_thread_array($news, '', $vba_options['portal_news_showicon']);

		if ($counter <= $vba_options['portal_news_maxposts'] AND $shownews)
		{
			// Signature
			$show['signature'] = false;
			if ($vba_options['portal_news_showsignature'] AND $news['showsignature'])
			{
				$news['signature'] = parse_bbcode($news['signature'], 'nonforum', $vboptions['allowsmilies']);
				$show['signature'] = true;
			}

			// News Avatar
			$newsavatarurl = '';
			if ($vba_options['portal_news_showavatar']) 
			{
				if ($news['avatarpath']) 
				{
					$newsavatarurl = $vboptions['bburl'] . '/' . $news['avatarpath'];
				}
				else if ($news['hascustom']) 
				{
					if ($vboptions['usefileavatar'])
					{
						$newsavatarurl = $vboptions['bburl'] . '/' . $vboptions['avatarurl'] . '/avatar' . $news['postuserid']. '_' . $news['avatarrevision'] . '.gif';
					}
					else
					{
						$newsavatarurl = $vboptions['bburl'] . '/image.php?' . $session['sessionurl'] . 'u=' . $news['postuserid'] . '&amp;dateline=' . $news['avatardateline'];
					}
				}
			}

			// News Message
	
			$allowsmilie = '';
			if ($vba_options['portal_news_enablesmilies'] AND $news['allowsmilie'])
			{
				$allowsmilie = 1;
			}

			$news['message'] = parse_bbcode2($news['pagetext'], $vba_options['portal_news_enablehtml'], $vba_options['portal_news_enablevbimage'], $allowsmilie, $vba_options['portal_news_enablevbcode']);
	
			if ($vba_options['portal_news_maxchars'] AND strlen($news['message']) > $vba_options['portal_news_maxchars'])
			{
				$news['message'] = fetch_trimmed_title($news['message'], $vba_options['portal_news_maxchars']) . construct_phrase($vbphrase['read_more'], $vboptions['bburl'], $news['threadid'], $session['sessionurl']);
			}
			
			// News Attachments
			$attachment = '';
			if ($news['attachmentid'])
			{
				$newsforumperms = fetch_permissions($news['forumid']);
				if ($news['thumbnail'] AND $vboptions['attachthumbs'] AND ($newsforumperms & CANGETATTACHMENT))
				{
					$attachment = '<a href="' . $vboptions['bburl'] . '/attachment.php?' . $session['sessionurl'] . 'attachmentid=' . $news['attachmentid'] . '" target="_blank"><img border="0" src="' . $vboptions['bburl'] . '/attachment.php?' . $session['sessionurl'] . 'attachmentid=' . $news['attachmentid'] . '&amp;stc=1&amp;thumb=1" /></a>';			
				}
				else
				{
					$attachment['attachmentextension'] = file_extension($news['filename']);
					$attachment['filename'] = $news['filename'];
					$attachment['attachmentid'] = $news['attachmentid'];
					$attachment['filesize'] = vb_number_format($news['filesize'], 1, true);
					$attachment['counter'] = $news['counter'];
					eval('$attachment = "' . fetch_template('postbit_attachment') . '";');
					$attachment = str_replace('"attachment.php', '"' . $vboptions['bburl'] . '/attachment.php', $attachment);
				}	
			}

			eval('$home[$newsid][\'content\'] .= "' . fetch_template('adv_portal_newsbits') . '";');
		}
		else
		{
			eval('$newsarchivebits .= "' . fetch_template('adv_portal_news_archivebits') . '";');
		}
	}				

	if ($showarchive AND $newsarchivebits)
	{
		eval('$home[$archiveid][\'content\'] = "' . fetch_template('adv_portal_news_archive') . '";');
	}

	$DB_site->free_result($getnews);
	unset($news, $foruminfo['allowratings'], $newsarchivebits, $attachment, $counter, $newsforumbits);
}

?>

What could be wrong??
  #9  
Old 09-16-2004, 11:50 AM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: not working

Double check that you have the 'adv_portal_news_archive' and 'adv_portal_news_archivebits' templates, and that you have a value set for the number of archived news posts to display on your 'Home / Default' page.
  #10  
Old 09-16-2004, 03:24 PM
-peace- -peace- is offline
Member
 
Join Date: Jul 2004
Location: Chicago
Posts: 72
Default Re: not working

Quote:
Originally Posted by Brian
Double check that you have the 'adv_portal_news_archive' and 'adv_portal_news_archivebits' templates, and that you have a value set for the number of archived news posts to display on your 'Home / Default' page.
I have those templates and the

Number of Archived News Posts to Display
Quote:
Set this to the number of news posts you would like to displayin the News Archive. Set this to 0 to disable the News Archive.
is set to 10
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Working Thumbincluder... Please? dbabaev Add-On Modules & Modifications 38 09-16-2005 04:55 PM
Control Panel Forums Homepage Link not working mazda6club Troubleshooting / "How do I..." Questions 2 05-27-2004 06:09 PM
[img] tags not working poseidon Troubleshooting / "How do I..." Questions 7 05-18-2004 09:13 AM


All times are GMT -4. The time now is 04:18 PM.

Forums Powered by vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Please note that vBadvanced is in no way affiliated with Jelsoft Enterprises Ltd, nor will Jelsoft be able to provide any support for our products.