Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

supprime "size=100x50&" 09 Dec 2013 20:15 #11794

  • LJ01
  • LJ01's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 78
  • Thank you received: 2
Hi
to display image in the grid
src="/index.php?option=com_batenergie&task=file&size=100x50&path=[DIR_BATENERGIE_IMAGE]stade_clermont.jpg"
where this code are generated, because i want to supprime "size=100x50&"
thanks
LJ
Ce sont les fils qui font les cordes
ingall-niger.org

Please Log in or Create an account to join the conversation.

supprime "size=100x50&" 11 Dec 2013 21:45 #11797

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
What do you mean ?

You want still to resize it, but without the url param ?

Well this URL might be generated by JDom
Then, the component helper catch it and output the resized thumb thanks to the classes/file.php class

Do you want to access directly or indirectly ?
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

supprime "size=100x50&" 12 Dec 2013 15:06 #11798

  • LJ01
  • LJ01's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 78
  • Thank you received: 2
Hi
i want to delete it, because in a view this code prevents the display of the image ...
LJ
Ce sont les fils qui font les cordes
ingall-niger.org

Please Log in or Create an account to join the conversation.

supprime "size=100x50&" 12 Dec 2013 15:08 #11799

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
I don't understand what you want to remove ?
Please be more specific.
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

supprime "size=100x50&" 12 Dec 2013 19:35 #11800

  • LJ01
  • LJ01's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 78
  • Thank you received: 2
delete &size=100x50 in the url
Ce sont les fils qui font les cordes
ingall-niger.org

Please Log in or Create an account to join the conversation.

supprime "size=100x50&" 12 Dec 2013 19:42 #11801

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
If you look at you file class, you can see this function.
You can redefine you image thumb size there.
public static function returnFile($mode = null)
{
	$jinput = JFactory::getApplication()->input;
	$path = $jinput->get('path', null, 'STRING');
	$size = $jinput->get('size', null, 'CMD');
	$action = $jinput->get('action', null, 'CMD');
	$attrs = $jinput->get('attrs', null, 'STRING');

	$filePath = null;
	if (!$path)
	{
		// Read through database index
		$view = $jinput->get('view', null, 'CMD');
		$key = $jinput->get('key', null, 'CMD');
		$cid = $jinput->get('cid', null, 'INT');

		if ($view && $key && $cid)
			$path = self::getFromIndex($view, $key, $cid);

		//Fallback
		if (!$path)
			$filePath = DEMO120_IMAGES_FALLBACK_ROOT .DS. DEMO120_IMAGES_FALLBACK_NAME;
	}

	$options = null;
	if (!$filePath && $path)
		$filePath = self::getPhysical($path, $options);


	$ext = self::getExt($filePath);



	jimport('joomla.filesystem.file');

	$imagesExt = array('jpg', 'jpeg', 'gif', 'png', 'bmp');
	$mime = null;
	if ($action == 'download')
		$mime = 'application/force-download';  // OU    application/octet-stream
	else if (self::exists($filePath))
		$mime = self::getMime($filePath);


	//Is image ?
	if (($action != 'download') &&
	(in_array($ext, $imagesExt)		//Check on extension
	|| ($mime && preg_match("/^image/", $mime)))			//Check on mime
	)
	{
		require_once(JPATH_ADMIN_DEMO120 .DS. 'classes' .DS. 'images.php');
		$thumb = new Demo120Images($filePath, $mime);

		if ($attrs)
			$thumb->attrs($attrs);


		if ($size && preg_match("/([0-9]+)x([0-9]+)/", $size, $matches))
		{
			$thumb->width($matches[1]);
			$thumb->height($matches[2]);;
		}

		$thumb->get();

		exit();
	}
	else if (!JFile::exists($filePath))
	{
		$app = JFactory::getApplication();
		$msg = JText::sprintf( "DEMO120_UPLOAD_FILE_NOT_FOUND", $path);
		$app->enqueueMessage($msg, 'error');

		jexit();
	}

	//Non image and non outputable mimes : Force download
	if (!in_array($mime, array(
							'application/x-shockwave-flash'
						)))
	{
		header('Content-Description: File Transfer');
	    header("Content-Disposition: attachment; filename=\"".basename($filePath) . "\"");
	}

	//Read and return file contents with original mime header
	header('Content-Type: ' . $mime);
	header('Content-Transfer-Encoding: binary');
	header('Expires: 0');
	header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
	header('Pragma: public');
	header('Content-Length: ' . filesize($filePath));
	ob_clean();
	flush();

	readfile($filePath);

	jexit();
}

EDIT :


Here
classes/file/file.php
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Last edit: by admin.

supprime "size=100x50&" 13 Dec 2013 11:42 #11802

  • LJ01
  • LJ01's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 78
  • Thank you received: 2
ok understand
now it's another problem deconnected the first
my miniatures aren't created with her extension -100x50.jpg when i load a image
i must create this manually ...
where look ?
LJ
Ce sont les fils qui font les cordes
ingall-niger.org

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.069 seconds

Awards for the best Joomla app. This product is gonna win an award for this amazing job. Cook Self Service is the the best application from all over the Joomla universe ! It brings Joomla to a professional level really advanced for developers. It is a real fun to develop with it. The ACL part and security checks implementation are just... so much hours saved. I can now concentrate myself more on the design part and the creative works. Thank you so much. Guys I offer you all my congratulation ! Keep up the works because Joomla is needing it to increase the quality of extensions availables on the JED. I also learned a lot because I can see how to code at the proper place and I found all my answers reading the forum.
lack_hanson (JED)
          

Get Started