Block issue

450

Tue Jun 15, 2021 11:46 am
NOOB!!!
28 Posts
Hi.
I have a block set up that shows some scrolling images.  Unfortunately when i go to add another image from Mediafire the original link option is not available to use and the link option i'm given is different from the original. It shows as a PNG not JPG and therefore the image does not show up.
Original image link:
Please login to see this link
Get registered or Log in

New image link:
Please login to see this link
Get registered or Log in

Is there some other code that someone might know which will allow images to show png, jpg or both?
Thanks

PS. I do know the flag images are different.. augen rollen


Please login to see this link
Get registered or Log in
Tue Jun 15, 2021 12:46 pm
Clan Leader
Top Dog
2631 Posts
coRpSE
Online
Most Played:
This week: 81.3hrs.
Total Played: 161hrs.
  
There is life outside of the game.
I never really MediaFire to host images, especially if I am using them on my site for hosting anything on 3rd party sites for things like images, will slow your page loads, and if any reason that connection between you and that host is lost, then, it will slow down your site load even more. MediaFire is more designed for you to upload larger files and share them to others, especially for those that don't have their own host. It's like a Dropbox or Google Drive, (except those two are cloud based).

I think they are doing what they are doing to stop people from hotlinking the images. Basically, in a sense, they are trying to stop people from embedding the images onto your site and forcing you just to link to the image on their site, so they get the traffic that wants to see that image.
Wed Jun 16, 2021 11:09 am
Original Poster
NOOB!!!
28 Posts
Thanks coRpSE. Is there any recommendations where to go to get a link for images that will show on site if not Mediafire?


 
Wed Jun 16, 2021 12:45 pm
Clan Leader
Top Dog
2631 Posts
coRpSE
Online
Most Played:
This week: 81.3hrs.
Total Played: 161hrs.
  
There is life outside of the game.
— Bulldog1 wrote
Thanks coRpSE. Is there any recommendations where to go to get a link for images that will show on site if not Mediafire?


Is locally hosting the files an option? What I mean is either uploading them to a folder you create on your site and using FTP, upload to that, or use something like Lonestars Image Repository module, seen
Please login to see this link
Get registered or Log in
, that way, the images would be on your site and won’t slow your site down.

Or, is using a 3rd party to host the images a must?  I know some host people have, came with game servers and what not, and they only give you a very limited amount of space to work with.


 
Wed Jun 16, 2021 1:33 pm
Original Poster
NOOB!!!
28 Posts
I do have my scrolling images on my website by using a block via
Please login to see this link
Get registered or Log in
It just will not let me add the different link that mediafire supplies.
I have tried an image using the image Repository and the image does show up, so i shall upload more to that. I just need to find the correct code to allow the scrolling part as the one Lonestar set up for me does not work.
I will sort it by trial and error with the code.


 
Wed Jun 16, 2021 2:36 pm
Clan Leader
Top Dog
2631 Posts
coRpSE
Online
Most Played:
This week: 81.3hrs.
Total Played: 161hrs.
  
There is life outside of the game.
— Bulldog1 wrote
I do have my scrolling images on my website by using a block via
Please login to see this link
Get registered or Log in
It just will not let me add the different link that mediafire supplies.
I have tried an image using the image Repository and the image does show up, so i shall upload more to that. I just need to find the correct code to allow the scrolling part as the one Lonestar set up for me does not work.
I will sort it by trial and error with the code.


Not sure what you mean, it won't supply you with a different link. If you upload an image via FTP, it shouldn't give you a link, but, knowing the folder path along with the name of the image.

(You may already know this, so this may be just for others that may come to this post.)

For example, If I open up my ftp to my site here, and I create a folder in the root of my site and call the folder, just say, my_images, then the URL to that folder would be YourSite.com/my_images/. So, lets say I upload an image called, my_dog.jpg, then the full patch would be, YourSite.com/my_images/my_dog.jpg.

Now, if you're posting in the forums, you have to use the absolute path, but in blocks/modules/ ect..., you can get away with using relative paths. Here is more of an example of that I mean about relative paths:

  /   = Root directory
  ./  = Current directory
  ../ = Parent of current directory
  ../../ = Two directories backwards

Here is a good source:
Please login to see this link
Get registered or Log in


Absolute paths
http://website.com/my_img/images.png
This is usually used if the image is not hosted on your site, but also, used in the forums.

//website.com/my_img/images.png
image loaded using http or https protocols

Relative paths
(Only used when the image is hosted on the same server as the site.)
images.png
./images.png
image in the same place as the document calling the image. You can technically use either one of those two. Most of the time, I see used ./images.png for easier readability.

/my_img/images.png
Similar to absolute path, just omitting the protocol and domain name.
It grabs the image starting from my root folder /, then into my_img/ folder.

my_img/images.png
this time my_img folder is in the same place as the document, so this is saying to go into my_img folder for the image

../my_img/images.png
From where the document is, go one folder back ../ and go into my_img folder.

../../images.png
go two folders back, there's my image!

../../my_img/images.png
go two folders back ../../ and then go into the folder my_img to find the image.png.

I know this can be a bit confusing at first, but it makes more sense to see it in use case. I will do a video tutorial on this probably tonight for better understanding for those that are confused. Overall, knowing these different types of paths can save you from a lot of wasted file paths that aren't needed.


 
Thu Jun 17, 2021 8:31 am
Original Poster
NOOB!!!
28 Posts
Thanks for all the above info, it will certainly be handy to learn.  prost


 
Forums ©