indie
08-31-2004, 08:28 PM
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
Brian
09-01-2004, 12:37 PM
There shouldn't be any reason why it wouldn't work... Did you perhaps change it in the wrong language?
indie
09-01-2004, 07:59 PM
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
Brian
09-01-2004, 08:03 PM
You have to change it in either the template (adv_portal_news_archive), or the phrase (news_archive).
indie
09-01-2004, 08:11 PM
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
indie
09-09-2004, 01:41 PM
Do you think in 2.0 changing it in the cp will change it in the module? that would be great. thanks!
-peace-
09-16-2004, 08:34 AM
Mine is not working either.
Here is the codes:
Module Title: News Archive
Module Identifier: newsarchive
File to Include: news.php
Templates Used: none
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"> </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 -->
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'] . '&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'] . '&stc=1&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??
Brian
09-16-2004, 11:50 AM
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.
-peace-
09-16-2004, 03:24 PM
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
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
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.