oops sorry i am getting function after the title. this is my title (????????????? : ???? ???????????????? ?????? - 36 ) function a(){var b=window.location.href,c=b.split("?");switch(c.length){case 1:return b+"?m=1";case 2:return 0
That's because their HTML is bad. Hotaru picks up what they have and then gives the user the option to change it.
User submit a post through external vote button. (without login) they got this error Sorry, you don't have permission to post links how to redirect to login page
Not sure if this will work but I'm guessing the easiest way would be to use a modified version of the /content/plugins/submit/libs/SubmitFunctions.php function checkErrors1 and add the following after line 129 in /content/plugins/submit/submit.php: Code: // check user is logged in if (!$h->currentUser->loggedIn) { // Redirect to login page $url = (isset($h->vars['submitted_data']['submit_orig_url'])) ? $h->vars['submitted_data']['submit_orig_url'] : false; if ($url) { $return = urlencode(BASEURL . 'index.php?page=submit&url=' . urlencode($url)); header("Location: " . BASEURL . 'index.php?page=login&return=' . $return); } else { $return = urlencode($h->url(array('page'=>'submit'))); header("Location: " . $h->url(array('page'=>'login', 'return'=>$return))); } die(); exit; }
Thanks. It redirect to login page after login, It redirect to home page. I am from external vote button So need to redirect to submit2 page. with grabbing url and title.
Then, instead of the code I posted, you could probably force the $url by just doing something like: Code: if (!$h->currentUser->loggedIn) { $url = $h->url(array('page'=>'submit2')); $return = urlencode(BASEURL . 'index.php?page=submit&url=' . urlencode($url)); header("Location: " . BASEURL . 'index.php?page=login&return=' . $return); }
I don't know how EVB works. When you click on the EVB button, what is the full URL it wants to send you to?
My site users using EVB. This is nothing like facebook share button. it grab user blog or site post url. Thanks.
Alright, let's go back to this post. Add the following after line 129 in /content/plugins/submit/submit.php: Code: if (!$h->currentUser->loggedIn) { $url = (isset($h->vars['submitted_data']['submit_orig_url'])) ? $h->vars['submitted_data']['submit_orig_url'] : "empty"; print "<br>submit_orig_url = " . $url; print "<br>uri = " . $h->cage->server->sanitizeTags('REQUEST_URI'); exit; } Then paste the output here so I can see what's coming in.
I am facing another problem also The original submitted url is this http://site.com/?????-????????????-????/ But the url is stored like this http://site.com/?????-??????????%2
And just to confirm: what you want to happen is that the user is brought to the login page and, once logging in, is then brought to https://myblogname.blogspot.com/. Is that correct?
When you say it is "stored like this," are you saying that's the way it is stored in the hotaru_posts table, specifically the post_orig_url column, after you submit it?
Please add the following after line 129 in /content/plugins/submit/submit.php and post the output: Code: // check user is logged in if (!$h->currentUser->loggedIn) { $request_uri = $h->cage->server->sanitizeTags('REQUEST_URI'); $search_for = "&url="; $search_for_length = strlen($search_for); $url_position_start = strpos($request_uri, $search_for) + $search_for_length; $url = ($url_position_start > $search_for_length) ? substr($request_uri, $url_position_start) : "no URL"; print "<br>request_uri = " . $request_uri; print "<br>search_for_length = " . $search_for_length; print "<br>url_position_start = " . $url_position_start; print "<br>url = " . $url; exit; if ($url) { $return = urlencode(BASEURL . 'index.php?page=submit&url=' . urlencode($url)); header("Location: " . BASEURL . 'index.php?page=login&return=' . $return); } else { $return = urlencode($h->url(array('page'=>'submit'))); header("Location: " . $h->url(array('page'=>'login', 'return'=>$return))); } exit; }
The result is request_uri = /index.php?page=submit&url=https://myblog.blogspot.com/2018/06/share-button.html search_for_length = 5 url_position_start = 27 url = https://myblog.blogspot.com/2018/06/share-button.html
I removed this lines print "<br>request_uri = " . $request_uri; print "<br>search_for_length = " . $search_for_length; print "<br>url_position_start = " . $url_position_start; print "<br>url = " . $url; exit; Now it is working fine thank you very much.