Rss with image: $image value
Re: Rss with image: $image value
1. That's a styling thing, you probably want to put each article in a div tag and add some margin to that tag. It would probably be easier to search for things like "div tag" "css styling" "css positioning" on google, you would find stuff in your own language
2. You have to try each method, if it fails move on to the next method and so on. For example you could try
[syntax=php]$entries = $xpath->query('//img');[/syntax]
And then check it using,
[syntax=php]$total = count($entries);[/syntax]
To see how many results you got.
2. You have to try each method, if it fails move on to the next method and so on. For example you could try
[syntax=php]$entries = $xpath->query('//img');[/syntax]
And then check it using,
[syntax=php]$total = count($entries);[/syntax]
To see how many results you got.
-
- Posts: 28
- Joined: Wed Jun 08, 2011 10:31 am
Re: Rss with image: $image value
1. question
http://www.moravaprom.com/ebchost/prikaz.php
if you see this, you will see the problem:
1. Picture dimension,
2. picture position,
3. link lenght problem (i know how to resolve, becose is separetet from <item> part )
that i can not control if i do not have imege url. for example $urlimage = url img from item;
2.question - thank, i will try. it seems to me logical and understand how to do
NOTE: I've mastered the basics of PHP and mjskl's. RSS reader is something new to me, and I see it as useful, because I get into so much detail
http://www.moravaprom.com/ebchost/prikaz.php
if you see this, you will see the problem:
1. Picture dimension,
2. picture position,
3. link lenght problem (i know how to resolve, becose is separetet from <item> part )
that i can not control if i do not have imege url. for example $urlimage = url img from item;
2.question - thank, i will try. it seems to me logical and understand how to do
NOTE: I've mastered the basics of PHP and mjskl's. RSS reader is something new to me, and I see it as useful, because I get into so much detail
Re: Rss with image: $image value
You can set the dimensions of the image just by setting the width and height in the tag like this
[syntax=xhtml]<img src="something" width="100" height="100" />[/syntax]
for 100x100 pixels.
[syntax=xhtml]<img src="something" width="100" height="100" />[/syntax]
for 100x100 pixels.
-
- Posts: 28
- Joined: Wed Jun 08, 2011 10:31 am
Re: Rss with image: $image value
Greate, i know for this. Thanks
but somthin is ? which value? which url? that's what interests me?
jacek wrote:You can set the dimensions of the image just by setting the width and height in the tag like this
[syntax=xhtml]<img src="something" width="100" height="100" />[/syntax]
for 100x100 pixels.
but somthin is ? which value? which url? that's what interests me?
-
- Posts: 28
- Joined: Wed Jun 08, 2011 10:31 am
Re: Rss with image: $image value
jacek wrote:Something would be the url of the image you want to display.
i know, but how to get url?
I need to separate url and text in two diferent div, an then to show tem
Re: Rss with image: $image value
Is the URL not the same as the one you use in the img tag here
[syntax=php]echo "$naslov, $opis, $sadrzaj, $izvor,, $url, $datum1, $datum2, <img src='$urlslike'/> </br></br>";[/syntax]
[syntax=php]echo "$naslov, $opis, $sadrzaj, $izvor,, $url, $datum1, $datum2, <img src='$urlslike'/> </br></br>";[/syntax]
-
- Posts: 28
- Joined: Wed Jun 08, 2011 10:31 am
Re: Rss with image: $image value
we are lost in the translation of the last few comments on this topic
Trust me, this is not problem form me. I know this and andrsthend...
I will try now through the examples to be as concrete more as possible
this is content form SADRZAJ field in rss_vesti tabele (this have value of item part of rss - beginig part of body in article news like you say):
ok.
1. How to get value "http://www.vesti-online.com/data/images/2011-06-05/156013_sampioni_kf.jpg" in $urlslike (translation - $imageurl) and
2. rest part of content form rss "Upravo zavrÅ¡ena klupska sezona obeležena je potpunom dominacijom Partizana, s obzirom da su sekcije naÅ¡eg najbrojnijeg sportskog druÅ¡tva osvojile Äak 11 pehara u pet najpopularnijih kolektivnih sportova." in $text
with $urlslike and $text i want to do the following:
[syntax=php]<div>
<div><?php echo "$urlslike; ?></div>
<div><?php echo "$text; ?></div>
</div>[/syntax]
I hope I'm far more understandable now. thanks
jacek wrote:Is the URL not the same as the one you use in the img tag here
[syntax=php]echo "$naslov, $opis, $sadrzaj, $izvor,, $url, $datum1, $datum2, <img src='$urlslike'/> </br></br>";[/syntax]
Trust me, this is not problem form me. I know this and andrsthend...
I will try now through the examples to be as concrete more as possible
this is content form SADRZAJ field in rss_vesti tabele (this have value of item part of rss - beginig part of body in article news like you say):
<img src="http://www.vesti-online.com/data/images/2011-06-05/156013_sampioni_kf.jpg?ver=1307647416"><br/>Upravo zavrÅ¡ena klupska sezona obeležena je potpunom dominacijom Partizana, s obzirom da su sekcije naÅ¡eg najbrojnijeg sportskog druÅ¡tva osvojile Äak 11 pehara u pet najpopularnijih kolektivnih sportova.<br/><br/>
ok.
1. How to get value "http://www.vesti-online.com/data/images/2011-06-05/156013_sampioni_kf.jpg" in $urlslike (translation - $imageurl) and
2. rest part of content form rss "Upravo zavrÅ¡ena klupska sezona obeležena je potpunom dominacijom Partizana, s obzirom da su sekcije naÅ¡eg najbrojnijeg sportskog druÅ¡tva osvojile Äak 11 pehara u pet najpopularnijih kolektivnih sportova." in $text
with $urlslike and $text i want to do the following:
[syntax=php]<div>
<div><?php echo "$urlslike; ?></div>
<div><?php echo "$text; ?></div>
</div>[/syntax]
I hope I'm far more understandable now. thanks
Re: Rss with image: $image value
You already have http://www.vesti-online.com/data/images ... 1307647416 in the variable $urlslike that is what you should use.
-
- Posts: 28
- Joined: Wed Jun 08, 2011 10:31 am
Re: Rss with image: $image value
Content of article $sadrzaj is:
this is code how to i get image url form article $sadrzaj
[syntax=php]$test = preg_match_all('/\"(.*?)\"/', $sadrzaj, $matches);
$slika2 = str_replace( '"','',$matches[0][0]);
echo $slika2;[/syntax]
How to get text ?
Atletska zvezda sa Jamajke želi da igra na Old Trafordu. Usain Bolt smatra da je dovoljno dobar da bude deo tima Aleksa Fergusona. Misli da bi trebalo da “dotera†tehniku, ali i da sada poseduje dovoljno kvaliteta da nosi dres “crvenih Ä‘avolaâ€.
<img src="http://www.rts.rs/thumbnail/bolt-t.jpg?thumbId=1686980&fileSize=56800&contentType=image/pjpeg&lastModified=1307717172000"
this is code how to i get image url form article $sadrzaj
[syntax=php]$test = preg_match_all('/\"(.*?)\"/', $sadrzaj, $matches);
$slika2 = str_replace( '"','',$matches[0][0]);
echo $slika2;[/syntax]
How to get text ?
Re: Rss with image: $image value
You could probably use
[syntax=php]strip_tags($sadrzaj);[/syntax]
as the text.
[syntax=php]strip_tags($sadrzaj);[/syntax]
as the text.
-
- Posts: 28
- Joined: Wed Jun 08, 2011 10:31 am
Re: Rss with image: $image value
Greate, thanks
Problem is solved
you can see finall resolt.
http://www.moravaprom.com/ebchost/prikaz.php
Now i can make the rss blog
Problem is solved
you can see finall resolt.
http://www.moravaprom.com/ebchost/prikaz.php
Now i can make the rss blog
Re: Rss with image: $image value
404 not found