Keyword

[SOLVED] Keeping orginal names in my images

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 1 month ago #142012 by Krikor Boghossian
Replied by Krikor Boghossian on topic Keeping orginal names in my images
Hahaha, nicely put.
Joseph is not the average user but as a proper workflow the use of a plugin is highly recommended.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
9 years 1 month ago #142020 by Joe Campbell
Replied by Joe Campbell on topic Keeping orginal names in my images
Thanks for the compliment Krikor.

I am still open to a non-hack solution. Remember, I am not a coder, so I need an explicit solution to render an extra field image without the default markup.

Anyone willing to help, please provide a copy & paste solution, something like...

<?php blah blah ExtraField -> alias -> blah blah ?>

to render any extra field image path only

/path/image.jpg

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

  • Kannan Naidu Venugopal
  • Kannan Naidu Venugopal's Avatar
  • Offline
  • Platinum Member
  • Aham Brahmasmi
More
9 years 1 month ago #142025 by Kannan Naidu Venugopal
Replied by Kannan Naidu Venugopal on topic Keeping orginal names in my images
You can try this method, i posted Here
<?php
        $string = $this->item->extraFields->GALLERYIMAGE->value;
        preg_match('/<img(.*)src(.*)=(.*)"(.*)"/U', $string, $result);
        $imgsrc = array_pop($result);
        ?> 

Item title as image alt
<img src="<?php echo $imgsrc ?>" alt="<?php echo $this->item->title; ?>" />

or custom alt
<img src="<?php echo $imgsrc ?>" alt="George Kollias - Death Metal Drummer" />

K2 Rocks \m/

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

More
8 years 9 months ago #146121 by Michael Yaeger
Replied by Michael Yaeger on topic Keeping orginal names in my images
I find it easier to just use a "Text Field" as the extra field type and then just echo the value as the src.

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

More
8 years 9 months ago #146126 by Joe Campbell
Replied by Joe Campbell on topic Keeping orginal names in my images
Hi Michael,

I find it easier to use the Image Field for selecting a desired image. Using a text field requires knowing the path to the image (by memory or copying and pasting it from another browser window - which is multiple steps in itself).

I really wish there was a parameter to disable the markup that is outputted when using the K2 Image Extra Field and provide a clean image path - so non-coders such as myself would not need to modify the K2 code to receive the same results.

Regards,

Joe

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

More
7 years 8 months ago #157074 by Joe Campbell
Replied by Joe Campbell on topic Keeping orginal names in my images
Hi Kannan,

I too prefer not to hack, but find it necessary at times.

In this case, you would have to specify every extra field that you want to output as an image path.
Which would require the you to update the code if any extra fields are changed (alias) or added.
This would be more complicated and time consuming than changing a small line of code.

I really wish there was a paramter to enable/disable markup for K2 extra field images.

Cheers,

Joe

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

More
7 years 6 months ago #158651 by Sohrab Abedini
Replied by Sohrab Abedini on topic Keeping orginal names in my images
Hello Krikor,

I use K2 as an absolute alternative of Joomla article manager. but I have a great issue with its SEO. K2 has great capabilities but in SEO it decrease my search appearance. Here I just saw you mentioned changing the default robot.txt
Actually I have never changed this. I am using joomla 3.6.3. Do you think this might have been the reason?
besides, I have applied all the necessary SEO tags in them including schema.org standards. and everything possible in SEO.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 6 months ago #158660 by Krikor Boghossian
Replied by Krikor Boghossian on topic Keeping orginal names in my images
Joomla! blocks the access to the /media folder. The media folder contains the images so this is not so good.
This can have an impact on your SEO.

You can also take a look at: extensions.joomla.org/extension/econa-for-joomla-articles-and-k2-items

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
7 years 6 months ago #158682 by Sohrab Abedini
Replied by Sohrab Abedini on topic Keeping orginal names in my images
Thanks for your reply. I did not understand how that extension which you suggested going to help.
but thanks for letting me know about that joomla blocks the \media directory.
K2 is great but it reduces the search appearances a lot. and make the images very hidden in the system unless the code is changes.
the name change and random names is one of them.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 6 months ago #158689 by Krikor Boghossian
Replied by Krikor Boghossian on topic Keeping orginal names in my images
K2 does not hide images, if you have a correct alt tag (which K2 produces btw) then you are ok.

Furthermore as explained in my previous post, you simply need to comment out a single line in the default robots.txt file.

The extension I posted will let you keep the original name of the image and provide some other functionality as well. It is completely unrelated to the robots.txt.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum