Преглед на файлове

Added link to the video for youtube feeds, removed the url validation in jQuery, we must find another way later

ravenlp преди 18 години
родител
ревизия
78ee1d2ec3
променени са 2 файла, в които са добавени 6 реда и са изтрити 2 реда
  1. 1 2
      admin/feeds.php
  2. 5 0
      classes/feeds.class.php

+ 1 - 2
admin/feeds.php Целия файл

@@ -55,8 +55,7 @@ if ($user->isAdmin()) {
55 55
 			$("#feedform").validate({
56 56
 				rules: {
57 57
 					url: {
58
-						required: true,
59
-						url: true
58
+						required: true
60 59
 					}
61 60
 				},
62 61
 				errorElement: "span",

+ 5 - 0
classes/feeds.class.php Целия файл

@@ -86,7 +86,12 @@ class feeds extends Conexion_Mysql {
86 86
 									if($post->get_title()  != $post->get_description()){
87 87
 										if(strpos($feed['url'],'twitter.com') <= 0){
88 88
 											$newPost['description'] = $post->get_description();
89
+											if(strpos($feed['url'],'youtube.com') > 0){
90
+												$newPost['description'] = preg_replace('/\<img ([^\>]+)/','<a href="'.$post->get_link().'"><img $1></a',$post->get_description());
91
+												
92
+											}
89 93
 										}
94
+
90 95
 									}
91 96
 								}elseif($feed['type'] == 2){ //IMAGES
92 97
 									$ma = array();