[PHP] is it possible to change the html title from the WYSIWYG editor?

2012-02-13 Thread Haluk Karamete
you may find it weird, actually very weird, but is the following possible

load up a post or page into the admin panel and place something like
this in to the editor;

?php

//assume exec-PHP already active

$current_page_url_here = get_current_url();

echo a href='{$current_page_url_here}?var1=val1'click me/a;

if ( $_GET['var1']=='val1' )
{
//change the current post's html title to titleval1/title
without using javascript/jquery
}
?

so when the visitor, clicks on the click me, same page reloads but
this time, the title reads val1, and that's what search engines see
too.
and if it is also possible to change, the_title() to be equal to val1,
that's even better.

But, is such a thing technically possible? Or is it too late at that
time to make those changes?
Could ob_start in any shape or form be deployed here to achieve this goal?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] is it possible to change the html title from the WYSIWYG editor?

2012-02-13 Thread Marc Guay
Based on the terms you're using it sounds like this is a Wordpress
question.  You'd have a lot better chances of getting an answer if you
query a group of WP gurus/geeks.

Marc

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] is it possible to change the html title from the WYSIWYG editor?

2012-02-13 Thread Daniel Brown
On Mon, Feb 13, 2012 at 15:50, Haluk Karamete halukkaram...@gmail.com wrote:
 you may find it weird, actually very weird, but is the following possible

 load up a post or page into the admin panel and place something like
 this in to the editor;

 ?php

 //assume exec-PHP already active

 $current_page_url_here = get_current_url();

 echo a href='{$current_page_url_here}?var1=val1'click me/a;

 if ( $_GET['var1']=='val1' )
 {
    //change the current post's html title to titleval1/title
 without using javascript/jquery
 }
 ?

 so when the visitor, clicks on the click me, same page reloads but
 this time, the title reads val1, and that's what search engines see
 too.
 and if it is also possible to change, the_title() to be equal to val1,
 that's even better.

 But, is such a thing technically possible? Or is it too late at that
 time to make those changes?
 Could ob_start in any shape or form be deployed here to achieve this goal?

This is not a WYSIWYG editor question; WYSIWYG editors are things
like KompoZer, Dreamweaver, FrontPage, and even web-based things like
TinyMCE, et al.

That aside, try this very basic example (and expounded) and see if
it's what you're trying to achieve:

?php
echo 'title';

if (isset($_GET['title'])) {
echo $_GET['title'];
} else {
echo 'The title has not been set!';
}

echo '/title'.PHP_EOL;

echo 'a 
href=http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?title=Enter+your+title+hereChange
Title/a'.PHP_EOL;

?

-- 
/Daniel P. Brown
Network Infrastructure Manager
http://www.php.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] is it possible to change the html title from the WYSIWYG editor?

2012-02-13 Thread Daniel Brown
On Mon, Feb 13, 2012 at 17:15, Haluk Karamete halukkaram...@gmail.com wrote:

Please keep the replies on the list for all to benefit, including
the archives.

 Isn't it TinyMCE considered a WYSIWYG one? but, anyway, that's beside
 the main point.

Indeed.  Hence:

 even web-based things like TinyMCE, et al.

 To your suggestion...

 I don't think your snippet would do any good as far as search
 engines...  search engines would still take the title in the head.
 here, we are already in the the_content().

Did you understand what I meant by very basic example?  You'd
need to modify your title.*/title tag in the head, as well,
obviously.  That's all quite logical, and well beyond the scope of the
initial question.

-- 
/Daniel P. Brown
Network Infrastructure Manager
http://www.php.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] is it possible to change the html title from the WYSIWYG editor?

2012-02-13 Thread Haluk Karamete
Yeah, but n the context of wordpress, that does not fly.
If I do a die; in the middle of wp's tinymce editor, and check back
the page, the title is already out there.

first 5 lines would be something like


!DOCTYPE html
html dir=ltr lang=en-US
head
meta charset=UTF-8 /
titlethe wordpress page title we were trying toi change is already
here.../title
link rel=profile href=http://gmpg.org/xfn/11; /

But this question is a wp question. I accidentally dropped it in the PHP group.

On Mon, Feb 13, 2012 at 2:24 PM, Daniel Brown danbr...@php.net wrote:
 On Mon, Feb 13, 2012 at 17:15, Haluk Karamete halukkaram...@gmail.com wrote:

    Please keep the replies on the list for all to benefit, including
 the archives.

 Isn't it TinyMCE considered a WYSIWYG one? but, anyway, that's beside
 the main point.

    Indeed.  Hence:

         even web-based things like TinyMCE, et al.

 To your suggestion...

 I don't think your snippet would do any good as far as search
 engines...  search engines would still take the title in the head.
 here, we are already in the the_content().

    Did you understand what I meant by very basic example?  You'd
 need to modify your title.*/title tag in the head, as well,
 obviously.  That's all quite logical, and well beyond the scope of the
 initial question.

 --
 /Daniel P. Brown
 Network Infrastructure Manager
 http://www.php.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] is it possible to change the html title from the WYSIWYG editor?

2012-02-13 Thread Bastien


Bastien Koert

On 2012-02-13, at 5:34 PM, Haluk Karamete halukkaram...@gmail.com wrote:

 Yeah, but n the context of wordpress, that does not fly.
 If I do a die; in the middle of wp's tinymce editor, and check back
 the page, the title is already out there.
 
 first 5 lines would be something like
 
 
 !DOCTYPE html
 html dir=ltr lang=en-US
 head
 meta charset=UTF-8 /
 titlethe wordpress page title we were trying toi change is already
 here.../title
 link rel=profile href=http://gmpg.org/xfn/11; /
 
 But this question is a wp question. I accidentally dropped it in the PHP 
 group.
 
 On Mon, Feb 13, 2012 at 2:24 PM, Daniel Brown danbr...@php.net wrote:
 On Mon, Feb 13, 2012 at 17:15, Haluk Karamete halukkaram...@gmail.com 
 wrote:
 
Please keep the replies on the list for all to benefit, including
 the archives.
 
 Isn't it TinyMCE considered a WYSIWYG one? but, anyway, that's beside
 the main point.
 
Indeed.  Hence:
 
 even web-based things like TinyMCE, et al.
 
 To your suggestion...
 
 I don't think your snippet would do any good as far as search
 engines...  search engines would still take the title in the head.
 here, we are already in the the_content().
 
Did you understand what I meant by very basic example?  You'd
 need to modify your title.*/title tag in the head, as well,
 obviously.  That's all quite logical, and well beyond the scope of the
 initial question.
 
 --
 /Daniel P. Brown
 Network Infrastructure Manager
 http://www.php.net/
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

Any reason you can't just use JS to alter the title tag on the page loading?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] is it possible to change the html title from the WYSIWYG editor?

2012-02-13 Thread Haluk Karamete
Search engines would still be indexing the original page's title. I
need each unique URL to have its own unique, robot friendly title.
Again, this question is strictly within WP context.



On Mon, Feb 13, 2012 at 6:49 PM, Bastien phps...@gmail.com wrote:


 Bastien Koert

 On 2012-02-13, at 5:34 PM, Haluk Karamete halukkaram...@gmail.com wrote:

 Yeah, but n the context of wordpress, that does not fly.
 If I do a die; in the middle of wp's tinymce editor, and check back
 the page, the title is already out there.

 first 5 lines would be something like


 !DOCTYPE html
 html dir=ltr lang=en-US
 head
 meta charset=UTF-8 /
 titlethe wordpress page title we were trying toi change is already
 here.../title
 link rel=profile href=http://gmpg.org/xfn/11; /

 But this question is a wp question. I accidentally dropped it in the PHP 
 group.

 On Mon, Feb 13, 2012 at 2:24 PM, Daniel Brown danbr...@php.net wrote:
 On Mon, Feb 13, 2012 at 17:15, Haluk Karamete halukkaram...@gmail.com 
 wrote:

    Please keep the replies on the list for all to benefit, including
 the archives.

 Isn't it TinyMCE considered a WYSIWYG one? but, anyway, that's beside
 the main point.

    Indeed.  Hence:

         even web-based things like TinyMCE, et al.

 To your suggestion...

 I don't think your snippet would do any good as far as search
 engines...  search engines would still take the title in the head.
 here, we are already in the the_content().

    Did you understand what I meant by very basic example?  You'd
 need to modify your title.*/title tag in the head, as well,
 obviously.  That's all quite logical, and well beyond the scope of the
 initial question.

 --
 /Daniel P. Brown
 Network Infrastructure Manager
 http://www.php.net/

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


 Any reason you can't just use JS to alter the title tag on the page loading?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php