May 4, 2011

Фид от криворукого 2: | CyberSEO Pro | CyberSEO support forum

Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Related Related Topics sp_TopicIcon
Фид от криворукого 2:
Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 Topic Rating: 0 (0 votes) 
December 2, 2011
10:00 pm
Avatar
Semen_ssr
Guest
Guests

Login to see this link

Автор решил, что не составит труда профиксить линки на тумбах.

December 15, 2011
7:26 pm
Avatar
CyberSEO
Admin
Forum Posts: 4276
Member Since:
July 2, 2009
sp_UserOfflineSmall Offline

Чисто как один из вариантов:

$post['post_excerpt'] = preg_replace('/(<img.*?>)/is', '<a href="' . $post['link'] . '">\\1</a>', $post['post_excerpt']);
December 29, 2011
9:03 am
Avatar
Semen_ssr
Guest
Guests

все четко Wink

December 29, 2011
3:02 pm
Avatar
CyberSEO
Admin
Forum Posts: 4276
Member Since:
July 2, 2009
sp_UserOfflineSmall Offline

Там, на самом деле, вариантов просто куча. Вплоть до того, что фид можно использовать как источник наполнения блого-тюбов. Например так:

if (!cseo_post_exists($post)) {
    // put the site link to paysite into the 'paysite_url' custom field according to Free WordPress Tube doc
    $post['custom_fields']['paysite_url'] = 'HTTP://WWW.SITE.COM/';
    // put site name into the "paysite_title" custom field according to Free WordPress Tube doc
    $post['custom_fields']['paysite_title'] = 'SITE NAME';
    // format clip's duration as mm:ss
    $post['custom_fields']['duration'] = '1:00';
    // create an URL of thumb from it's path and file name
    preg_match('/<img.*?src="(.*?)"/', $post['post_excerpt'], $matches);
    $post['custom_fields']['thumb'] = cseo_save_image($matches[1], $post['post_title']);
    $post['post_excerpt'] = strip_tags($post['post_excerpt']);
    // now the most complex part. we have to create the JW Player code,
    // assuming that the player itself is stored as flvplayer.swf in the root dir of the blog
    $post['custom_fields']['video_code'] = '<embed
  flashvars="image=' . $post['custom_fields']['thumb'] . '&file=' . $post['enclosure_url'] . '&link=' . urlencode($post['custom_fields']['paysite_url']) . '&autostart=true&displayclick=link"
  width="600"
  height="466"
  allowfullscreen="true"
  allowscripaccess="always"
  id="flvplayer"
  name="flvplayer"
  src="/flvplayer.swf"
/>';
} else {
    $post = false;
}

Специализированные тюбовые движки такой фид вряд ли пропарсят.

Forum Timezone: Europe/Amsterdam

Most Users Ever Online: 1026

Currently Online:
15 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

ninja321: 87

harboot: 75

s.baryshev.aoasp: 68

Freedom: 61

Pandermos: 54

tormodg: 53

Member Stats:

Guest Posters: 338

Members: 3322

Moderators: 0

Admins: 1

Forum Stats:

Groups: 1

Forums: 5

Topics: 1760

Posts: 9080

Newest Members:

ntzaferis, mario.claroarcos, welf.kienle.kienle, lapageparfaite27, vardis11, miranewsru

Administrators: CyberSEO: 4276