10 years ago
Topic

Hello!

First of all I want to say thank you to Seblod. You are the best extension I've ever found for joomla.

Now to my question: I have to create an URL / IP list for gameservers for a client, so I created a form including the field for the IP (textfield), as example let's say the user wants to add examplegame.com . Every gameserver has an icon in the game, but I there's an API which can load those icons with PHP, so I can access it. 

It works like this www.blablaexample.com/icon/?server=examplegame.com
This URL returns only an image, with HTML I can access it with <img src="/www.blablaexample.com/icon/?server=examplegame.com">

What I want to do is almost the same like in this topic (but it's already 2 years old...)
I want to use the data in the field "IP" and generate an html code: <img src="/www.blablaexample.com/icon/?server=DATA_FROM_IP_FIELD"> and insert this picture in front of an article (the article is the detail page for the gameserver).

Hopefully you have an idea how to do this, because I've never done something like this before (some people really have exotic wishes...)
:)

Thanks a lot in advance for every answer!

Kevin

Get a VIP membership
693 Posts
rpoy
10 years ago
2
Level 1

Hi Kevin,

Welcome to the SEBLOD forums!  We are glad you are finding SEBLOD useful.  If you havent done so, please take a moment to review the documentation in the Manuals section.  It would also be helpful for you to be familiar with the SEBLOD storage methodology in this tutorial and videos.  Also check out the demos section, and products which will help extending SEBLOD further.

In your Content Type (Form) on the Content tab (option #2). Set up an HTML Typography then all you need to do is something like:

<img src="/www.blablaexample.com/icon/?server=$cck->getValue('IP_FIELD_Name');">

Hope that helps,

Randy

10 years ago
1
Level 2

Thank you for your quick reply Randy. I've tested that and it worked well. But I'm not sure which field I should use for the HTML Typography, is that important or can I just use the "text box" field? Because I need a field to display the typography, right? (I'm sorry, I've never used the HTML Typography because I never had to... I'm very happy that this forum exists!)

And yes, that helped a lot :-)

Kevin

693 Posts
rpoy
10 years ago
0
Level 3

Hi Kevin,

You can use any field that you want, but the "text box" for your IP_Field_Name should be fine. You are basically changing the appearance of it, but still using it to create the link to the image.

The Typography, is very useful. This is where you set up the much of the field details - if its an image, then how functions. How you want the field to look (bold, header etc).

regards,

Randy

Get a Book for SEBLOD