Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Latest web links add new image

Asked Modified Viewed 2,464 times
M
Maiky20
M
  • Newbie, joined since
  • Contributed 9 posts on the community forums.
  • Started 4 threads in the forums
  • Started this discussions
asked
Newbie

Hi

Please ;) How add image new
msts.cekuj.net/infusions/articles_panel/images/new.gif
The latest web links panel.

Add the image
msts.cekuj.net/infusions/articles_panel/images/new.gif
new here
Code:
openside("Nové Pridané ZSSK MSTS");
echo "<table width='100%' border='0' cellspacing='2' cellpadding='0'>\n<tr valign='top'>
\n<td width='25%'>\n";
openside("Rušne ZSCS/ŽSR");

include LOCALE.LOCALESET."weblinks.php";

//Category ID to show latest weblinks from
$cat_id ="9";

$result = dbquery("SELECT
      weblink_id,
      weblink_name,
      weblink_datestamp FROM ".DB_WEBLINKS." tl
      LEFT JOIN ".DB_WEBLINK_CATS." tc
      ON tl.weblink_cat=tc.weblink_cat_id
      WHERE ".groupaccess('tc.weblink_cat_access')." AND tc.weblink_cat_id=".$cat_id."
      ORDER BY weblink_datestamp DESC LIMIT 0,5");

if (dbrows($result)) {
     while($data = dbarray($result)) {
            $weblink_name = trimlink($data['weblink_name'], 23);
              echo THEME_BULLET." <a href='".BASEDIR."weblinks.php?weblink_id=".$data['weblink_id']."' title='".$data['weblink_name']."' class='side' target='_blank'>".$weblink_name."</a> <br />\n";
           }
       } else {
       echo "<div style='text-align:center'>".$locale['431']."</div>\n";
  }
closeside();


Excuse my English :)

Thank you very much.
0 replies

4 posts

C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

Hi,

Here you go...

<?php

openside("Rušne ZSCS/ŽSR");

include LOCALE.LOCALESET."weblinks.php";

//Category ID to show latest weblinks from
$cat_id ="9";

$result = dbquery("SELECT
      weblink_id,
      weblink_name,
      weblink_datestamp FROM ".DB_WEBLINKS." tl
      LEFT JOIN ".DB_WEBLINK_CATS." tc
      ON tl.weblink_cat=tc.weblink_cat_id
      WHERE ".groupaccess('tc.weblink_cat_access')." AND tc.weblink_cat_id=".$cat_id."
      ORDER BY weblink_datestamp DESC LIMIT 0,5");

if (dbrows($result)) {
     while($data = dbarray($result)) {
if ($data['weblink_datestamp']+604800 > time()+($settings['timeoffset']*3600)) {
                  $new = "<img src='".INFUSIONS."articles_panel/images/new.gif' style='border: 0px; ' alt='NEW' />";
               } else {
                  $new = "";
               }
            $weblink_name = trimlink($data['weblink_name'], 23);
              echo "<div  style='width:99%;'>".THEME_BULLET." <div style='float: right; padding-right: 3px;'>".$new."</div><a href='".BASEDIR."weblinks.php?weblink_id=".$data['weblink_id']."' title='".$data['weblink_name']."' class='side' target='_blank'>".$weblink_name."</a></div>\n";
           }
       } else {
       echo "<div style='text-align:center'>".$locale['431']."</div>\n";
  }
closeside();

?>


Regards
0 replies
M
Maiky20
M
  • Newbie, joined since
  • Contributed 9 posts on the community forums.
  • Started 4 threads in the forums
  • Started this discussions
answered
Newbie

Good work :G ;)
Thanks!
0 replies
C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

Your welcome!
0 replies
M
Maiky20
M
  • Newbie, joined since
  • Contributed 9 posts on the community forums.
  • Started 4 threads in the forums
  • Started this discussions
answered
Newbie

Hi

Could someone make this code so that it redirects me to a certain category? When I click on the name.

openside("Rušne ZSCS/ŽSR");

include LOCALE.LOCALESET."weblinks.php";

//Category ID to show latest weblinks from
$cat_id ="9";

$result = dbquery("SELECT
      weblink_id,
      weblink_name,
      weblink_datestamp FROM ".DB_WEBLINKS." tl
      LEFT JOIN ".DB_WEBLINK_CATS." tc
      ON tl.weblink_cat=tc.weblink_cat_id
      WHERE ".groupaccess('tc.weblink_cat_access')." AND tc.weblink_cat_id=".$cat_id."
      ORDER BY weblink_datestamp DESC LIMIT 0,5");

if (dbrows($result)) {
     while($data = dbarray($result)) {
if ($data['weblink_datestamp']+214800 > time()+($settings['timeoffset']*3600)) {
                  $new = " [<span class='small' style='color: #ff0000;'>NEW</span>]";
               } else {
                  $new = "";
               }
            $weblink_name = trimlink($data['weblink_name'], 23);
              echo "<div  style='width:99%;'>".THEME_BULLET." <div style='float: right; padding-right: 3px;'>".$new."</div><a href='".BASEDIR."weblinks.php?cat_id=".$data['weblink_cat_id']."' title='".$data['weblink_name']."' class='side' target='_blank'>".$weblink_name."</a></div>\n";
           }
       } else {
       echo "<div style='text-align:center'>".$locale['431']."</div>\n";
  }
closeside();


Thank you very much.
Edited by Maiky20 on 18-05-2014 14:10,
0 replies

Category Forum

Panels and Infusions

Labels

None yet

Statistics

  • Views 0 views
  • Posts 4 posts
  • Votes 0 votes
  • Topic users 2 members

2 participants

C
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
M
M
  • Newbie, joined since
  • Contributed 9 posts on the community forums.
  • Started 4 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet