Why is it that there's a conflict on submit buttons between the page of creating/ editing articles and to the special page that i've created. What i mean is that after clicking the 'Save Page' button on the creating/editing page, i am redirected to a blank page. But when I reload that blank page, i can now view the page i just created/edited.
Is there something that I have to add to my special page to avoid this one? The special pages that i've created are working. It's just strange seeing the blank page because a user is supposed to be redirected properly to the page that they just created/edited.
2009/8/29 Kathleen Borja jane88borj@yahoo.com:
Why is it that there's a conflict on submit buttons between the page of creating/ editing articles and to the special page that i've created. What i mean is that after clicking the 'Save Page' button on the creating/editing page, i am redirected to a blank page. But when I reload that blank page, i can now view the page i just created/edited.
Is there something that I have to add to my special page to avoid this one? The special pages that i've created are working. It's just strange seeing the blank page because a user is supposed to be redirected properly to the page that they just created/edited.
A blank page typically indicates a PHP error of some kind. Check your error logs or enable error display in the browser, see [1]. Also, you should really be asking these questions on wikitech-l; this list is about the bot API.
Roan Kattouw (Catrope)
Roan Kattouw <roan.kattouw <at> gmail.com> writes:
A blank page typically indicates a PHP error of some kind. Check your error logs or enable error display in the browser, see [1]. Also, you should really be asking these questions on wikitech-l; this list is about the bot API.
Roan Kattouw (Catrope)
Thanks for your help. I solved them with your help. ^_^ I wanted to ask some more questions here. As much as possible, I am getting fast responses. I hope you would allow me. Thanks.
I have a problem in fetching the actual raw data or the original article text in a wiki page.
I looked into the database table 'wbt_searchindex' in mediawiki. I fetch 'si_text' knowing that it's the right one in fetching the original text of an article page. But, it's used for search function. What i wanted to fetch is the original text so i could use it in my Bikol Thesaurus.
-How can I fetch the original article text on a wiki page? -In what database table is the original article text located?
In the 'searchindex' table, the 'si_text' contains the u800 unicode character.
-What does u800 really means? -What does u800 do? -What does u800 represents?
Thanks. ^_^
2009/9/1 Kathleen Borja jane88borj@yahoo.com:
I have a problem in fetching the actual raw data or the original article text in a wiki page.
I looked into the database table 'wbt_searchindex' in mediawiki. I fetch 'si_text' knowing that it's the right one in fetching the original text of an article page. But, it's used for search function. What i wanted to fetch is the original text so i could use it in my Bikol Thesaurus.
-How can I fetch the original article text on a wiki page? -In what database table is the original article text located?
searchindex contains, well, the search index, which means it's not the complete content and some things like short words and non-ASCII characters get encoded so they can be found more easily. For getting the content, you should do something like:
$title = Title::newFromText("Main Page"); // Or use some other way of obtaining a Title object $article = new Article($title); $content = $article->getContent();
Note that getContent() has the annoying side effect of returning a "This page does not exist"-like message if the page doesn't exist, so you'll wanna check for $title->exists() as well.
Roan Kattouw (Catrope)
I set the following variables in LocalSettings.php file. The 'ccs.adnu.edu.ph' is an intranet. It's our school's server so I can just access it within the school. $wgServerName = 'ccs.adnu.edu.ph';$wgServer = 'http://ccs.adnu.edu.ph';
Say if i am accessing my page outside the school, having the address of my main page http://ccs.adnu.edu.ph/wikibits/index.php/Main_Page, it can be viewed and is still accessible. But when I tried logging in, i am redirected to this address http://ccs/wikibits/index.php/Main_Page which is an invalid page. So, in this case, the $wgServer has the value of 'http://ccs%27.How can i fix this properly? Thanks, guys. ^_^
Kathleen Borja wrote:
Thanks for your help. I solved them with your help. ^_^ I wanted to ask some more questions here. As much as possible, I am getting fast responses. I hope you would allow me. Thanks.
I have a problem in fetching the actual raw data or the original article text in a wiki page.
I looked into the database table 'wbt_searchindex' in mediawiki. I fetch 'si_text' knowing that it's the right one in fetching the original text of an article page. But, it's used for search function. What i wanted to fetch is the original text so i could use it in my Bikol Thesaurus.
-How can I fetch the original article text on a wiki page? -In what database table is the original article text located?
The real text is stored in the table text, or in some location pointed from there. Don't access the table directly! You must create a Title, from which you instantiate an Article object and call getContent() to retrieve its text.
In the 'searchindex' table, the 'si_text' contains the u800 unicode character.
-What does u800 really means? -What does u800 do? -What does u800 represents?
A character outside of ascii which are escaped so mysql search can find it. It's an implementation detail, you shouldn't touch the searchindex table unless you're creating a search extension (also note that if the wiki uses a search extension instead of the default mysql search, searchindex will be empty).
Platonides <platonides <at> gmail.com> writes:
The real text is stored in the table text, or in some location pointed from there. Don't access the table directly! You must create a Title, from which you instantiate an Article object and call getContent() to retrieve its text.
A character outside of ascii which are escaped so mysql search can find it. It's an implementation detail, you shouldn't touch the searchindex table unless you're creating a search extension (also note that if the wiki uses a search extension instead of the default mysql search, searchindex will be empty).
Thanks to you guys. ^_^ Yeepee! Finally, I tried the getContent() method and it worked! Hmmm..now I am thinking if how will i use that method given the selected titles that i'll be using from the database table wbt_page. The page_title has underscores. I am thinking that i'll just strip off those underscores and replace them with spaces so it will look like title. Is it right? I think that there will be no differences with that, isn't it?
And also, thanks for the information on the u800.
Thanks. ^_^
2009/9/1 Kathleen Borja jane88borj@yahoo.com:
Thanks to you guys. ^_^ Yeepee! Finally, I tried the getContent() method and it worked! Hmmm..now I am thinking if how will i use that method given the selected titles that i'll be using from the database table wbt_page. The page_title has underscores. I am thinking that i'll just strip off those underscores and replace them with spaces so it will look like title. Is it right? I think that there will be no differences with that, isn't it?
And also, thanks for the information on the u800.
You can use Title::newFromRow($row) to create a Title object from a database row object.
Roan Kattouw (Catrope)
Roan Kattouw <roan.kattouw <at> gmail.com> writes:
You can use Title::newFromRow($row) to create a Title object from a database row object.
Roan Kattouw (Catrope)
I'll be trying the Title::newFromRow($row) method. ^_^ Thanks. I am thinking of using a foreach loop right now. Is it right?
Kathleen Borja <jane88borj <at> yahoo.com> writes:
Roan Kattouw <roan.kattouw <at> gmail.com> writes:
You can use Title::newFromRow($row) to create a Title object from a database row object.
Roan Kattouw (Catrope)
I tried using the Title::newFromRow($row) method. Some titles are not fetched. Only some are displayed. I'll try to debug them. I hope you could still help me with this.
Anyway, thanks a lot. ^_^
Roan Kattouw <roan.kattouw <at> gmail.com> writes:
You can use Title::newFromRow($row) to create a Title object from a database row object.
Roan Kattouw (Catrope)
I am still working on the Title::newFromRow($row) method to fetch the article titles. Anyway, how can i know the username logged in mediawiki? How can i use it in the php code? I would like to insert that value to a table field in my thesaurus.
Thanks.^_^
Kathleen Borja wrote:
I am still working on the Title::newFromRow($row) method to fetch the article titles. Anyway, how can i know the username logged in mediawiki? How can i use it in the php code? I would like to insert that value to a table field in my thesaurus.
Thanks.^_^
global $wgUser is an User object which contain the current user.
Platonides <platonides <at> gmail.com> writes:
global $wgUser is an User object which contain the current user.
Thanks. I used the User object. So, I have something like this: global $wgUser; $user = $wgUser->getName(); $wgOut->addHTML($user);
I have another question but it's about special pages. Can i change the layout of a particular special page? I made a special page to be pop up window. I wanted to make a new layout for it. how can i make it? is it possible?
Roan Kattouw <roan.kattouw <at> gmail.com> writes:
You can use Title::newFromRow($row) to create a Title object from a database row object.
Roan Kattouw (Catrope)
I'm still working on with my thesis - the Bikol Thesaurus. A week or two from now would be our final defense. I was able to resolve some issues or problems that I've encountered with the help of you, guys. Thanks a lot! ^_^
I still have queries for you, guys. I hope I could still get help from you even though this may not be appropriate on this group. - How can I create a graph in wiki? Can I create a graph using a special page and the editor? (e.g bar graph, line graph, etc.) I would like to create a graph which is automatically updated using some data fetched from the database. Is this possible?
Again, thanks guys!
Kathleen Borja wrote:
I'm still working on with my thesis - the Bikol Thesaurus. A week or two from now would be our final defense. I was able to resolve some issues or problems that I've encountered with the help of you, guys. Thanks a lot! ^_^
I still have queries for you, guys. I hope I could still get help from you even though this may not be appropriate on this group.
- How can I create a graph in wiki? Can I create a graph using a special page
and the editor? (e.g bar graph, line graph, etc.) I would like to create a graph which is automatically updated using some data fetched from the database. Is this possible?
Again, thanks guys!
http://www.mediawiki.org/wiki/Extension:EasyTimeline
In this case you want to call an extension from another extension, you can call renderTimeline() from your code.
Platonides <platonides <at> gmail.com> writes:
http://www.mediawiki.org/wiki/Extension:EasyTimeline
In this case you want to call an extension from another extension, you can call renderTimeline() from your code.
Thanks. I'll be reading the article on the link you provided. And I'll try asap how to make graphs. For now, I'm resolving if how could i get the category name of an article. I used an extension yet it just create an article to a category. I used the getContent() method and checks for the [[Category:Name]] in the text. I'm still debugging for on some rows the category name couldn't be displayed...
Kathleen Borja <jane88borj <at> yahoo.com> writes:
Platonides <platonides <at> gmail.com> writes:
http://www.mediawiki.org/wiki/Extension:EasyTimeline
In this case you want to call an extension from another extension, you can call renderTimeline() from your code.
I was able to resolve issues that i've encountered on getting the category name of a certain article. Now, I'll be doing that graph thing. ^_^ But, still I don't know how to do so using the renderTimeline() method. I hope it would be just simple an easy.
Kathleen Borja wrote:
Kathleen Borja <jane88borj <at> yahoo.com> writes:
Platonides <platonides <at> gmail.com> writes:
http://www.mediawiki.org/wiki/Extension:EasyTimeline
In this case you want to call an extension from another extension, you can call renderTimeline() from your code.
I was able to resolve issues that i've encountered on getting the category name of a certain article. Now, I'll be doing that graph thing. ^_^ But, still I don't know how to do so using the renderTimeline() method. I hope it would be just simple an easy.
Pass the parameter in the format of http://www.mediawiki.org/wiki/Extension:TimelineTable
Platonides <platonides <at> gmail.com> writes:
Thanks. I really needed your help.. especially with this one. I just encountered a big problem while ago.. :[ Now, I cannot proceed to the graph thing.. I must solve this big problem now.. My mentor and I just uploaded all my files in the web server so it can be accessed online. But, why is it that the special pages that i've included in the /extensions directory and all the changes i've made did not display? I've created special pages following the required files for making a special page. Did i do it right? All works fine in my localhost server... I think there's something to configure with the path in webserver..
Thanks a lot.^_^
Kathleen Borja wrote:
Thanks. I really needed your help.. especially with this one. I just encountered a big problem while ago.. :[ Now, I cannot proceed to the graph thing.. I must solve this big problem now.. My mentor and I just uploaded all my files in the web server so it can be accessed online. But, why is it that the special pages that i've included in the /extensions directory and all the changes i've made did not display? I've created special pages following the required files for making a special page. Did i do it right? All works fine in my localhost server... I think there's something to configure with the path in webserver..
Thanks a lot.^_^
If it's just http://localhost/wiki/ vs http://www.example.com/wiki/ the only thing you may need to change is $wgServer. If you have changed from http://localhost/wiki/ to something different like http://www.example.com/~kat/wiki/ look at $wgScriptPath and $ArticlePath. If you had rewrite rules, they may need to be checked.
Platonides <platonides <at> gmail.com> writes:
If it's just http://localhost/wiki/ vs http://www.example.com/wiki/ the only thing you may need to change is $wgServer. If you have changed from http://localhost/wiki/ to something different like http://www.example.com/~kat/wiki/ look at $wgScriptPath and $ArticlePath. If you had rewrite rules, they may need to be checked.
Thanks a lot. Now, I cannot try those things you've said for the server im using is down right now. I hope it would be functioning sooner. I just hope so. :[ I'll try those things as soon as the server is on its good situation. I hope it will work fine.
Just a few remarks. So, in the LocalSettings.php file, I'll be adding the line: $wgServer = 'http://www.example.com/wiki/';
Is it right?
Again, thanks. I'll be back to you as soon as I've tried it out.
Kathleen Borja wrote:
Platonides <platonides <at> gmail.com> writes:
If it's just http://localhost/wiki/ vs http://www.example.com/wiki/ the only thing you may need to change is $wgServer. If you have changed from http://localhost/wiki/ to something different like http://www.example.com/~kat/wiki/ look at $wgScriptPath and $ArticlePath. If you had rewrite rules, they may need to be checked.
Thanks a lot. Now, I cannot try those things you've said for the server im using is down right now. I hope it would be functioning sooner. I just hope so. :[ I'll try those things as soon as the server is on its good situation. I hope it will work fine.
Just a few remarks. So, in the LocalSettings.php file, I'll be adding the line: $wgServer = 'http://www.example.com/wiki/';
Is it right?
Again, thanks. I'll be back to you as soon as I've tried it out.
No. $wgServer would be just 'http://www.example.com' See http://www.mediawiki.org/wiki/Manual:$wgServer
The 'folders' are on $wgScriptPath and $ArticlePath.
Platonides <platonides <at> gmail.com> writes:
No. $wgServer would be just 'http://www.example.com' See http://www.mediawiki.org/wiki/Manual:$wgServer
The 'folders' are on $wgScriptPath and $ArticlePath.
Thanks. But, still,i can't try those things you've said. The server to where my project is stored is still not operating :[ For the meantime, my friend let me access another server. So, i have uploaded my files there. After clicking my link, no main page was displayed instead it says: ==================================================================== MediaWiki requires PHP 5.0.0 or higher. You are running PHP 4.4.8. You may be able to use MediaWiki using a .php5 file extension. ==================================================================== We've checked that it's actually running php 5.2.6 and not php 4.4.8..How come it says it's running PHP 4.4.8. So, my friend can't help me with this one..
So, i can't fix the bug. :[ i wanna try those asap.
Kathleen Borja wrote:
Thanks. But, still,i can't try those things you've said. The server to where my project is stored is still not operating :[ For the meantime, my friend let me access another server. So, i have uploaded my files there. After clicking my link, no main page was displayed instead it says: ==================================================================== MediaWiki requires PHP 5.0.0 or higher. You are running PHP 4.4.8. You may be able to use MediaWiki using a .php5 file extension. ==================================================================== We've checked that it's actually running php 5.2.6 and not php 4.4.8..How come it says it's running PHP 4.4.8. So, my friend can't help me with this one..
So, i can't fix the bug. :[ i wanna try those asap.
MediaWiki is being run on that server by PHP4, which is unsupported. Check the server config. The box may have both php4 and php5 installed. Did you try accessing index.php5 instead of index.php?
Platonides <platonides <at> gmail.com> writes:
MediaWiki is being run on that server by PHP4, which is unsupported. Check the server config. The box may have both php4 and php5 installed. Did you try accessing index.php5 instead of index.php?
I tried accessing index.php5 yet it displayed errors. So, I tried installing mediawiki on that shared host server for at first I just uploaded my recent files on it. I was thinking the settings on the LocalSettings.php file aren't compatible on the server.
When I tried re-installing it, on the Site Config Page, there were warnings stated below: ------------------------------------------------------------------------------- Warning: exec() has been disabled for security reasons in /home/lockhead/public_html/borj_thesis/wikibits/config/index.php on line 2005
Warning: array_map() [function.array-map]: Argument #2 should be an array in /home/lockhead/public_html/borj_thesis/wikibits/config/index.php on line 2010
Warning: Invalid argument supplied for foreach() in /home/lockhead/public_html/borj_thesis/wikibits/config/index.php on line 2013 ------------------------------------------------------------------------------- So, I wasn't able to install it. Well, this was just a temporary option which i wanna try while the real server i'm really using is located in our school. I can't access the server here in our house to fix some bugs for it can only be accessed within school. Our school was temporarily closed until this day. I hope i could access it this Thursday.
Here is the link of my page http://ccs.adnu.edu.ph/wikibits/index.php/Main_Page In the navigation box, 'Bikol Literature' link is special page that I've made but it can't be displayed. There's something wrong with the path. I've changed also the background, look but the changes can't be displayed. :[
The server ccs.adnu.edu.ph is located in our school. This was the server to where i uploaded my files.
Thanks.
2009/9/16 Kathleen Borja jane88borj@yahoo.com:
Here is the link of my page http://ccs.adnu.edu.ph/wikibits/index.php/Main_Page In the navigation box, 'Bikol Literature' link is special page that I've made but it can't be displayed. There's something wrong with the path. I've changed also the background, look but the changes can't be displayed. :[
Make sure the following line appears in the extension setup file:
$wgSpecialPages['BikolLiterature'] = 'SpecialBikolLiterature'; // Where 'SpecialBikolLiterature' is the name of a class extending SpecialPage
Roan Kattouw (Catrope)
Roan Kattouw <roan.kattouw <at> gmail.com> writes:
Make sure the following line appears in the extension setup file:
$wgSpecialPages['BikolLiterature'] = 'SpecialBikolLiterature'; // Where 'SpecialBikolLiterature' is the name of a class extending SpecialPage
Roan Kattouw (Catrope)
Thanks for the response. Anyway, what I have in my code is like this:
$wgSpecialPages['BikolLiterature'] = 'BikolLiterature';
Is it different from what you have just stated? Or is there a need to append 'Special' at the beginning of the special pagename?
Still, I'm collecting possible solutions for my problem. I can't try them out now for I can't access the ccs.adnu.edu.ph server to fix some bugs. The server is located in our school and badly, our school is temporarily closed until now. Tomorrow, im hoping i could do so. But, thanks to you. I badly needed your help especially with the special pages not displaying properly. I must fix them all asap.:[
Again, thanks.
2009/9/16 Kathleen Borja jane88borj@yahoo.com:
Thanks for the response. Anyway, what I have in my code is like this:
$wgSpecialPages['BikolLiterature'] = 'BikolLiterature';
Is it different from what you have just stated? Or is there a need to append 'Special' at the beginning of the special pagename?
What matters is the name of the class. Somewhere, you'll have something like:
class Blahblah extends SpecialPage {
The "Blahblah" part is what you should fill out for the second 'BikolLiterature' (where I used 'SpecialBikolLiterature').
Roan Kattouw (Catrope)
Roan Kattouw <roan.kattouw <at> gmail.com> writes:
What matters is the name of the class. Somewhere, you'll have something like:
class Blahblah extends SpecialPage {
The "Blahblah" part is what you should fill out for the second 'BikolLiterature' (where I used 'SpecialBikolLiterature').
Roan Kattouw (Catrope)
Thanks. What I have is something like this:
$wgSpecialPages['BikolLiterature'] = 'BikolLiterature';
So, from what you've said, i got it right. Everything works well in my localhost. The only problem that I'm experiencing right now is that the special pages like the 'BikolLiterature' seems to be an invalid one with the uploaded in the http://ccs.adnu.edu.ph/wikibits/index.php/Special:BikolLiterature
There's something wrong with the path. Platonides gave me some possible solutions as follows: ----------------------------------------------------------------------- If it's just http://localhost/wiki/ vs http://www.example.com/wiki/ the only thing you may need to change is $wgServer. If you have changed from http://localhost/wiki/ to something different like http://www.example.com/~kat/wiki/ look at $wgScriptPath and $ArticlePath. If you had rewrite rules, they may need to be checked. ----------------------------------------------------------------------- Then, he added: $wgServer would be just 'http://www.example.com' See http://www.mediawiki.org/wiki/Manual:$wgServer
The 'folders' are on $wgScriptPath and $ArticlePath.
----------------------------------------------------------------------- I'll be trying those as soon as i was able to access the server im using. If you have additional possible solutions, I'll really appreciate them all. I really needed your help, guys.
Thanks! ^_^
Roan Kattouw <roan.kattouw <at> gmail.com> writes:
What matters is the name of the class. Somewhere, you'll have something like:
class Blahblah extends SpecialPage {
The "Blahblah" part is what you should fill out for the second 'BikolLiterature' (where I used 'SpecialBikolLiterature').
Roan Kattouw (Catrope)
I'm accessing now the server 'ccs.adnu.edu.ph' to fix some bugs.. I tried what Platonides suggested. It didn't work out. :( The code below is what I tried:
--------------------------------------------------------------------- /** URL of the server. It will be automatically built including https mode */ $wgServer = '';
if( isset( $_SERVER['SERVER_NAME'] ) ) { $wgServerName = $_SERVER['SERVER_NAME']; } elseif( isset( $_SERVER['HOSTNAME'] ) ) { $wgServerName = $_SERVER['HOSTNAME']; } elseif( isset( $_SERVER['HTTP_HOST'] ) ) { $wgServerName = $_SERVER['HTTP_HOST']; } elseif( isset( $_SERVER['SERVER_ADDR'] ) ) { $wgServerName = $_SERVER['SERVER_ADDR']; } else { $wgServerName = 'localhost'; }
# check if server use https: $wgProto = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http';
$wgServer = $wgProto.'://' . $wgServerName; # If the port is a non-standard one, add it to the URL if( isset( $_SERVER['SERVER_PORT'] ) && !strpos( $wgServerName, ':' ) && ( ( $wgProto == 'http' && $_SERVER['SERVER_PORT'] != 80 ) || ( $wgProto == 'https' && $_SERVER['SERVER_PORT'] != 443 ) ) ) {
$wgServer .= ":" . $_SERVER['SERVER_PORT']; --------------------------------------------------------------------- Is it right? Am i missing something?
Thanks.
Roan Kattouw <roan.kattouw <at> gmail.com> writes:
What matters is the name of the class. Somewhere, you'll have something like:
class Blahblah extends SpecialPage {
The "Blahblah" part is what you should fill out for the second 'BikolLiterature' (where I used 'SpecialBikolLiterature').
Roan Kattouw (Catrope)
I can't really make it work. :[ What shall i do now? I really needed your help, guys. I can hardly set $wgServer. I've tried a lot of possible solutions yet it didn't work out. :( I hope i can finish this in a minute.
I can't proceed to testing of my wiki in 'ccs.adnu.edu.ph' server although i've tried it in localhost. I must make it work so other people can add words and meanings in my thesaurus. I'm running out of time.. :[
Thanks.
mediawiki-api@lists.wikimedia.org