Commit 0f304e17 by Bagus Pambudi

fix rss dan progres autopost alia

parent ba88a207
...@@ -164,21 +164,21 @@ class PostController extends Controller ...@@ -164,21 +164,21 @@ class PostController extends Controller
// $this->socialRepo->sendLinkToFacebook(url('post/'.$data['slug']), $data['content']); // $this->socialRepo->sendLinkToFacebook(url('post/'.$data['slug']), $data['content']);
if ($value->type == 'twitter') { // if ($value->type == 'twitter') {
//Social Share Twitter // //Social Share Twitter
Config::set('larasap.twitter', [ // Config::set('larasap.twitter', [
'consurmer_key' => $value->key_1, // 'consurmer_key' => $value->key_1,
'consurmer_secret' => $value->key_2, // 'consurmer_secret' => $value->key_2,
'access_token' => $value->key_3, // 'access_token' => $value->key_3,
'access_token_secret' => $value->key_4, // 'access_token_secret' => $value->key_4,
]); // ]);
if ($img == '') { // if ($img == '') {
$this->socialRepo->sendTextTweet($setting['header_admin'].'-'.$title."\n\n".$url."\n\n".$hashtag); // $this->socialRepo->sendTextTweet($setting['header_admin'].'-'.$title."\n\n".$url."\n\n".$hashtag);
} else { // } else {
$this->socialRepo->sendTweetWithMedia($setting['header_admin'].'-'.$title."\n\n".$url."\n\n".$hashtag, [$img]); // $this->socialRepo->sendTweetWithMedia($setting['header_admin'].'-'.$title."\n\n".$url."\n\n".$hashtag, [$img]);
} // }
} // }
} }
} }
......
...@@ -61,6 +61,9 @@ class AutopostRepository extends Repository ...@@ -61,6 +61,9 @@ class AutopostRepository extends Repository
$str .= 'CHANNEL USERNAME => '.$row->key_3.'<br>'; $str .= 'CHANNEL USERNAME => '.$row->key_3.'<br>';
$str .= 'CHANNEL SIGNATURE => '.$row->key_4.'<br>'; $str .= 'CHANNEL SIGNATURE => '.$row->key_4.'<br>';
$str .= 'PROXY => '.$row->key_5; $str .= 'PROXY => '.$row->key_5;
} elseif ($row->type == 'alia') {
$str = 'URL => '.$row->key_1.'<br>';
$str .= 'POSTS => '.$row->key_2.'<br>';
} }
return $str; return $str;
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
@foreach($posts as $post) @foreach($posts as $post)
<item> <item>
<title><![CDATA[{{ $post->title }}]]></title> <title><![CDATA[{{ $post->title }}]]></title>
<link>{{ $post->slug }}</link> <link>{{ url('post/'.$post['slug'])}}</link>
<description><![CDATA[{!! $post->content !!}]]></description> <description><![CDATA[{!! $post->content !!}]]></description>
<category>{{ $post->rCategory->name }}</category> <category>{{ $post->rCategory->name }}</category>
{{-- <author><![CDATA[{{ $post->slug }}]]></author>--}} {{-- <author><![CDATA[{{ $post->slug }}]]></author>--}}
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<div class="form-group @if ($errors->has('type')) has-error @endif"> <div class="form-group @if ($errors->has('type')) has-error @endif">
<label class="col-md-2 control-label">Type</label> <label class="col-md-2 control-label">Type</label>
<div class="col-md-10"> <div class="col-md-10">
{{ Form::select('type', ['facebook' => 'Facebook', 'twitter' => 'Twitter', 'telegram' => 'Telegram'], old('type'), array('class' => 'form-control fmtype', 'id' => 'type', 'placeholder' => '- Pilih -')) }} {{ Form::select('type', ['facebook' => 'Facebook', 'twitter' => 'Twitter', 'telegram' => 'Telegram', 'alia' => 'Alia'], old('type'), array('class' => 'form-control fmtype', 'id' => 'type', 'placeholder' => '- Pilih -')) }}
@if ($errors->has('type')) @if ($errors->has('type'))
<label id="login-error" class="error" for="login">{{$errors->first('type')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('type')}}</label>
@endif @endif
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<div class="form-group @if ($errors->has('type')) has-error @endif"> <div class="form-group @if ($errors->has('type')) has-error @endif">
<label class="col-md-2 control-label">Type</label> <label class="col-md-2 control-label">Type</label>
<div class="col-md-10"> <div class="col-md-10">
{{ Form::select('type', ['facebook' => 'Facebook', 'twitter' => 'Twitter', 'telegram' => 'Telegram'], old('type'), array('class' => 'form-control fmtype', 'id' => 'type', 'placeholder' => '- Pilih -')) }} {{ Form::select('type', ['facebook' => 'Facebook', 'twitter' => 'Twitter', 'telegram' => 'Telegram', 'alia' => 'Alia'], old('type'), array('class' => 'form-control fmtype', 'id' => 'type', 'placeholder' => '- Pilih -')) }}
@if ($errors->has('type')) @if ($errors->has('type'))
<label id="login-error" class="error" for="login">{{$errors->first('type')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('type')}}</label>
@endif @endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment