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?

Resize pictures in news

Asked Modified Viewed 4,222 times
L
Lagotolio
L
  • Junior Member, joined since
  • Contributed 10 posts on the community forums.
  • Started 3 threads in the forums
  • Started this discussions
asked
Junior Member

I hope this is the right place to ask this question.

I have a problem at my site, which I am working on at the moment. Not finish at all though. :)

But, when adding a picture, using the "add picture" in the news template, the picture seems to be upscaled a certain % - and I can not figure out where I delete this, as the picture should not scale up, but rather scale down, og keep original size of picture.

Can anyone help.
Check it out...
http://www.iden.dk/files/news.php?readmore=2
It's the "bugs picture" - and is the same in all other news I have tested.

Hope to hear from someone, that can help me out.
Edited by Lagotolio on 21-06-2016 14:03,
0 replies

10 posts

F
Falk
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
answered
Super Admin

Hi, First of all I need you to respect our licenses, your site does not have a valid CRL and your Theme footer violates our license on many aspects

1, The link to use is not there only the name powered by, it must be a link.
2, AGPL is not stated while your site are under this license until anything else have been issued.

Please read and comply or you can purchase CRL and do what you want with the footer ( https://www.php-fusion.co.uk/license/ )
0 replies
L
Lagotolio
L
  • Junior Member, joined since
  • Contributed 10 posts on the community forums.
  • Started 3 threads in the forums
  • Started this discussions
answered
Junior Member

Hi

I am well aware of the license.. And respect them.
Thank you.

But can anyone please help with the issue I'm asking?
Edited by N/A on 24-06-2016 08:35,
0 replies
F
Falk
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
answered
Super Admin

Your News have a setting for it Admin > Settings Admin > News > https://www.php-fusion.co.uk/infusions/wiki/documentation.php?page_id=192
0 replies
D
douwe_yntema
D
  • Senior Member, joined since
  • Contributed 667 posts on the community forums.
  • Started 57 threads in the forums
  • Answered 1 question
answered
Senior Member

That documentation is for V9, and I believe the question is for V7 site.

I Once made an adaption in the theme/theme.php like this:

            // beperk afmetingen van de foto's
            $newstrim = str_replace ("<img", "<img style='max-width: 300px; max-height: 300px;'",$news);
            echo "<div class='subject1'>".$newstrim."</div>\n";
0 replies
L
Lagotolio
L
  • Junior Member, joined since
  • Contributed 10 posts on the community forums.
  • Started 3 threads in the forums
  • Started this discussions
answered
Junior Member

Thank you both of you.
Yes it's for the v7. :)

This may be a studpid question, but where do I put it, ind the theme.php

<?php
/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright (C) 2002 - 2011 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Car Theme for PHPFusion V7.02.xx
| Author: jikaka
| Web: www.rusfusion.com
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }

define("THEME_BULLET", "<img src='".THEME."images/bullet.gif' class='bullet' alt='&raquo;' border='0' />");

require_once THEME."functions.php";
require_once INCLUDES."theme_functions_include.php";

function render_page($license = false) {
   
   add_handler("theme_output");
   global $settings, $main_style, $locale, $mysql_queries_time;
   
   echo "<div class='bg'><div class='wrapper'>\n";
   
   //Header
   echo "<div class='main-header'>\n";
   echo "<div class='flleft' style='padding: 10px 0 0 10px;'>".showbanners()."</div>\n";
   echo "<div class='search'>\n";

   

   echo "</form>\n";
   echo "</div>\n";
   echo "</div>\n";
   echo "<div class='sub-header clearfix floatfix'>\n";
   echo "<div class='flleft'>".showsublinks("","")."</div>\n";

   echo "</div>\n";

   // Content
   echo "<div class='main-bg'>\n";
   if ($_SERVER['SCRIPT_NAME'] == "/news.php") {
      require_once THEME."slide.php";
   }
   if (LEFT) { echo "<div id='side-left'>".LEFT."</div>\n"; }
   if (RIGHT) { echo "<div id='side-right'>".RIGHT."</div>\n"; }
   echo "<div id='side-center' class='".$main_style."'>";
   echo "<div class='upper'>".U_CENTER."</div>\n";
   echo "<div class='content'>".CONTENT."</div>\n";
   echo "<div class='lower'>".L_CENTER."</div>\n";
   echo "</div>\n";
   echo "<div class='clear'></div>\n";
   echo "</div>\n";

   
//Footer
   echo "<div class='main-footer clearfix'>\n";
   echo "<div class='flleft'>\n";
   if (!$license) { echo showcopyright(); }
   echo "<br />Theme modified from RedCar by <a href='http://www.rusfusion.ru'>jikaka</a></div>\n";
   if ($settings['rendertime_enabled'] == 1 || ($settings['rendertime_enabled'] == 2 && iADMIN))
   {echo "<div class='flright' style='width: 50%; text-align: right;'>".showrendertime()."<br />".stripslashes($settings['footer'])."<br />".showcounter()."</div>\n";
   }
   else { echo "<div class='flright' style='width: 50%; text-align: right;'>".stripslashes($settings['footer'])."<br />".showcounter()."</div>\n"; }
   echo "</div>\n";

}

function render_comments($c_data, $c_info){
   global $locale;
   
   if (!empty($c_data)){
      echo "<div class='comments floatfix'>\n";
      
   if ($c_info['admin_link'] !== false) {
       echo "<div class='floatfix'>\n";
       echo "<div class='comment_admin'>".$c_info['admin_link']."</div>\n";
      echo "</div>\n";
   }

      foreach($c_data as $data) {
         
         echo "<div class='comment-main spacer'>\n";
         echo "<div class='tbl2'>\n";
      if ($data['edit_dell'] !== false) { echo "<div style='float:right' class='comment_actions'>".$data['edit_dell']."\n</div>\n"; }
         echo "<a href='".FUSION_REQUEST."#c".$data['comment_id']."' id='c".$data['comment_id']."' name='c".$data['comment_id']."'>#".$data['i']."</a> |\n";
         echo "<span class='comment-name'>".$data['comment_name']."</span>\n";
         echo "<span class='small'>".$data['comment_datestamp']."</span>\n";
         echo "</div>\n<div class='tbl1 comment_message'>".$data['comment_message']."</div>\n";
         echo "</div>\n";
         
      }
      
   if ($c_info['c_makepagenav'] !== false) {
         echo "<div class='comment-main clearfix spacer'>\n";
         echo "<div class='flleft'>".$c_info['c_makepagenav']."</div>\n";
         echo "</div>\n";
   }
      
      echo "</div>\n";
         
   } else {
       echo "<div class='nocomments-message spacer'>".$locale['c101']."</div>\n";
   }
 
}

function render_news($subject, $news, $info) {
global $locale, $settings, $aidlink;

   echo "<div class='capmain floatfix'>\n";
   echo "<div class='capmain-in'>".$subject."</div>\n";
   echo "<div class='news_info floatfix'>\n";
   echo "<ul>\n";

   echo "<li class='date'>".showdate("%d %b %Y", $info['news_date'])."</li>\n";
   if ($info['cat_id'])
   echo "</ul>\n";
   if (iADMIN && checkrights("N")) {
      echo "<div class='flright clearfix' style='padding: 10px 10px 0 0;'>\n";
      
      echo "</div>\n";
   }
   echo "</div>\n";
   echo "</div>\n";
   echo "<div class='main-body floatfix'>\n";
   if ($info['news_sticky'] == "1") {
      echo "<div style='position:absolute; padding-top:3px;'><img src='".THEME."images/icons/sticky.png' alt='sticky' width='41px' border='0' height='41px' /></div>";
   }
   echo $info['cat_image'].$news."<br />\n";
   echo "<div class='news_info floatfix'>\n";
   echo "<ul>\n";
   if ($info['news_ext'] == "y" || ($info['news_allow_comments'] && $settings['comments_enabled'] == "1")) {
   }
   if ($info['news_allow_comments'] && $settings['comments_enabled'] == "1") {
      
   }
   
   echo "</ul>\n";
   if (!isset($_GET['readmore']) && $info['news_ext'] == "y") {
      echo "<div class='flright'>\n";
      echo "<a href='".BASEDIR."news.php?readmore=".$info['news_id']."' class='button'><span class='rightarrow icon'></span>".$locale['global_072']."</a>\n";
      echo "</div>\n";
      
   }
   echo "</div>\n";
   echo "</div>\n";
   echo "<div class='spacer'></div>\n";

}

function render_article($subject, $article, $info) {
global $locale, $settings, $aidlink;

set_image("edit", THEME."images/icons/article_edit.png");
   
   echo "<div class='capmain floatfix'>\n";
   echo "<div class='capmain-in'>".$subject."</div>\n";
if (iADMIN && checkrights("A")) {
   echo "<div class='flright clearfix' style='padding-right: 13px;'>\n";
    echo "<a href='".ADMIN."articles.php".$aidlink."&amp;action=edit&amp;article_id=".$info['article_id']."'><img src='".get_image("edit")."' alt='".$locale['global_076']."' title='".$locale['global_076']."' /></a>\n";
   echo "</div>\n"; }
   echo "</div>\n";
   echo "<div class='spacer'>\n";
   echo "<div class='news_info middle-border floatfix'>\n";
   echo "<ul>\n";
   echo "<li class='print'><a href='".BASEDIR."print.php?type=A&amp;item_id=".$info['article_id']."'><span>".$locale['global_075']."</span></a></li>\n";
   echo "<li class='date'>".showdate("%d %b %Y", $info['article_date'])."</li>\n";
   echo "<li class='author'>".profile_link($info['user_id'], $info['user_name'], $info['user_status'])."</li>\n";
if ($info['cat_id']) {
   echo "<li class='cat'><a href='".BASEDIR."articles.php?cat_id=".$info['cat_id']."'>".$info['cat_name']."</a></li>\n";
   } else { echo "<li class='cat'><a href='".BASEDIR."articles.php?cat_id=0'>".$locale['global_080']."</a></li>\n"; }
   echo "<li class='reads'>".$info['article_reads'].$locale['global_074']."</li>\n";
if ($info['article_allow_comments'] && $settings['comments_enabled'] == "1") {
   echo "<li class='comments'><a href='".BASEDIR."articles.php?article_id=".$info['article_id']."#comments'>".$info['article_comments'].($info['article_comments'] == 1 ? $locale['global_073b'] : $locale['global_073'])."</a></li>\n"; }
   echo "</ul>\n";
    echo "</div>\n";
   echo "<div class='main-body floatfix'>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."</div>\n";
   echo "</div>\n";
   
}

function opentable($title) {

   echo "<div class='capmain'><div class='capmain-in'>".$title."</div></div>\n";
   echo "<div class='main-body floatfix spacer'>\n";

}

function closetable() {

   echo "</div>\n";

}

function openside($title, $collapse = false, $state = "on") {

   global $panel_collapse; $panel_collapse = $collapse;
   
   echo "<div class='scapmain clearfix'>\n";
   echo "<div class='scapmain-in'>".$title."</div>\n";
   if ($collapse == true) {
      $boxname = str_replace(" ", "", $title);
      echo "<div class='flright' style='padding-top: 2px;'>".panelbutton($state, $boxname)."</div>\n";
   }
   echo "</div>\n";
   
   echo "<div class='side-body spacer'>\n";
   if ($collapse == true) { echo panelstate($state, $boxname); }
   
}

function closeside() {
   
   global $panel_collapse;

   if ($panel_collapse == true) { echo "</div>\n"; }
   echo "</div>\n";

}

?>
0 replies
K
KasteR
K
KasteR 10
  • Senior Member, joined since
  • Contributed 290 posts on the community forums.
  • Started 1 thread in the forums
answered
Senior Member

Lagotolio, the size of the image that appears is the actual size. There is no scaling. Just look at your image source:
http://www.iden.dk/files/images/news/thumbs/bugs_t1.gif


Two things you can do,
[olist=1]Resize the images (which should be choice #1 to optimize load times).
Modify your stylesheet to scale the image down.[/olist]

If you choose to modify your stylesheet, locate .news-category and change it from

this:
.news-category {
   -moz-box-shadow: inset 0 0 2px 2px #d8d8d8;
   -webkit-box-shadow: inset 0 0 2px 2px#d8d8d8;
   box-shadow: inset 0 0 2px 2px #d8d8d8;
   border: 1px solid #c8c8c8;
   -webkit-border-radius: 2px;
   -moz-border-radius: 2px;
   border-radius: 2px;
   margin: 3px 5px 0 0; /* top right bottom left*/
   padding: 0px;
   float: left;
}

to:
.news-category {
   -moz-box-shadow: inset 0 0 2px 2px #d8d8d8;
   -webkit-box-shadow: inset 0 0 2px 2px#d8d8d8;
   box-shadow: inset 0 0 2px 2px #d8d8d8;
   border: 1px solid #c8c8c8;
   -webkit-border-radius: 2px;
   -moz-border-radius: 2px;
   border-radius: 2px;
   margin: 3px 5px 0 0; /* top right bottom left*/
   padding: 0px;
   float: left;
   height: 70px;
   width: 90px;
}


Lastly, thank you for including the copyright :G and good job!
0 replies
F
Falk
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
answered
Super Admin

Quote

That documentation is for V9, and I believe the question is for V7 site.

Yes, It was linked to the v7 section, we have both up now :)
0 replies
L
Lagotolio
L
  • Junior Member, joined since
  • Contributed 10 posts on the community forums.
  • Started 3 threads in the forums
  • Started this discussions
answered
Junior Member

@Falk - Thank you for the link, but can't see, what it is, I have to change in there. :) :) Sorry - still learning.
But think it is these things I have to get a hold on.
Image Upload
Thumb Ratio: When you upload an image, the system will automatically create a thumbnail image, [smaller version] to display on the front page [if enabled].
This setting allows for either the original height and width ratio to be maintained or for it to be forced into a square.

Thumb size:
Set the width and height of the thumbnail images.
If original ratio is set, only width will be applied.

Photo size:
Set height and width of full image to be displayed in Read More.



@
KasteR
I also thought, that it was me, uploading it worng, but the picture I choose from me computer is 90*70px
See added picture bugs.png

When I choose it here:
Udklip3.png
It makes a new picture, that is saved in images/news/thumbs and then gets the name bugs_t2
This picture is scaled up.

The code you send me, does not solve it. :)
It also controls the news category, and when changed it, it also changes at the starting page news the nes overview.

I just want the picture that is uploaded to keep be maximum 150 px width, and then the height will be adjusted.

Does it make sense, or is it completely rubbish? :|

---and thanks :)



Merged on Jun 25 2016 at 10:10:18:
UPDATE

It seems to work now.
It sizes down/up to max 150 px
I have no clue what and how it suddenly works for me. But ... It seems to work now.
Edited by Lagotolio on 25-06-2016 10:14,
Lagotolio attached the following file:
udklip3.png [No information available / 96 Downloads]
bugs.gif [No information available / 91 Downloads]
0 replies
D
douwe_yntema
D
  • Senior Member, joined since
  • Contributed 667 posts on the community forums.
  • Started 57 threads in the forums
  • Answered 1 question
answered
Senior Member

You should insert the code at line 138 where te $news is echoed
0 replies
L
Lagotolio
L
  • Junior Member, joined since
  • Contributed 10 posts on the community forums.
  • Started 3 threads in the forums
  • Started this discussions
answered
Junior Member

Hi douwe_yntema
Thanks - I will try it out, if it goes wrong with the current settings. It seems to work now.

Merged on Jun 25 2016 at 21:12:59:
...but ran into a new issue, I hope people can help with... :) :)
Tried to figure out how I can get the pictures (news cats) to stay in the left side
http://www.iden.dk/files/news.php

but these ind the read more news, to go to the right side. :)
http://www.iden.dk/files/news.php?readmore=5

Everytime I change something to "right" in stead of left, both links pictures go to the right side :) :)
Edited by Lagotolio on 25-06-2016 21:12,
0 replies

Labels

None yet

Statistics

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

4 participants

F
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
K
K
KasteR 10
  • Senior Member, joined since
  • Contributed 290 posts on the community forums.
  • Started 1 thread in the forums
D
D
  • Senior Member, joined since
  • Contributed 667 posts on the community forums.
  • Started 57 threads in the forums
  • Answered 1 question
L
L
  • Junior Member, joined since
  • Contributed 10 posts on the community forums.
  • Started 3 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet