WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Bugs in Andreas00 at Latest News Section
  • Print
Pages: [1]   Go Down

Author Topic: Bugs in Andreas00 at Latest News Section  (Read 4194 times)

fakhu420

  • Guest
Bugs in Andreas00 at Latest News Section
« on: June 13, 2008, 10:11:52 AM »
Two bugs are present in the template Andreas00

1. In the latest news column it also shows the news which are not active.
    On clicking the link to a non-active news it displays a dreadful error.
    (See line 32 in andreas00/index.php )
2. It takes it obvious that you have your pages directory set to WB_URL/pages.
    This makes incorrect display of the links to latest news if the pages directory has been changed.
    (See line 43 in andreas00/index.php )

The solution to the above problems are:

1. At line 32 replace the line
Code: [Select]
$query = "SELECT post_id,title,content_short,group_id,link FROM ".TABLE_PREFIX."mod_news_posts ORDER BY position DESC LIMIT 0, 5;";
with
Code: [Select]
$query = "SELECT post_id,title,content_short,group_id,link FROM ".TABLE_PREFIX."mod_news_posts WHERE active=1 ORDER BY position DESC LIMIT 0, 5;";
2. Replace line 43
Code: [Select]
echo '<p><a href="'.WB_URL.'/pages/'.$link.PAGE_EXTENSION.'" class="latestnews">'.$title.'</a></p>';
with the line
Code: [Select]
echo '<p><a href="'.WB_URL.PAGES_DIRECTORY.$link.PAGE_EXTENSION.'" class="latestnews">'.$title.'</a></p>';
I have also created an updated package of the above template.


[gelöscht durch Administrator]
« Last Edit: June 13, 2008, 04:31:22 PM by GeekF »
Logged

Offline ruebenwurzel

  • Betatester
  • **
  • Posts: 8544
  • Gender: Male
  • Keep on Rockin
    • Familie Gallas Online
Re: Bugs in Andreas00 in
« Reply #1 on: June 13, 2008, 10:19:01 AM »
Hello,

wouldn't it be better to use:

Code: [Select]
href="'.WB_URL.PAGES_DIRECTORY.$link.PAGE_EXTENSION.'"
instead of:

Code: [Select]
href="'.WB_URL.mysql_query($query).$link.PAGE_EXTENSION.'"
Matthias
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Bugs in Andreas00 at Latest News Section
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2