Adding a feature "What links to this page" which enables one to see all wikipedia pages that are linked to a particular page.
yashi2016-09-28 20:56
Under Manage Groups, we added a drop down: "What Links Here"
This link shows you all other wikipedia pages that are linked to this page. So, if a page is related to n different pages, those pages will be displayed here. Thus, relationships between pages can be understood.
Steps to reproduce:
The following steps will help to reproduce the added feature:
1. Go to localhost/yioop
2. Under Social->Manage Groups->Click on any new group[Wiki]->Click on the drop down
3. Now choose: What links to this page in the drop down
4. All pages that link to this particular page will be displayed.
Additional information:
N/A
yashi2016-09-28 21:11
Hello Professor,
I have added the patch for "What Links Here" feature to be added to Wikipedia pages. Please review. Thank you.
Regards,
Yashi
administrator2016-10-05 21:07
Hey Yashi,
Your patch shouldn't be touching Config.php . Use a LocalConfig.php file if you want to set the WORK_DIRECTORY to a value other than the default. Please make a new patch without the changes to Config.php and post it (this should be a quick change).
Best,
Chris
yashi2016-10-05 21:58
Hello Professor,
I will make the changes tomorrow. Although it is a minor change, i deleted the copy of Yioop on my system that day when i met you (while trying to show you the bug). SO i have to fresh clone Yioop and incorporate all the changes again. Thank you.
Regards,
Yashi
administrator2016-10-06 08:39
Here are some other things that need to be fixed about the patch:
(1) trailing whitespace and excessive indents (8 rather than 4 spaces) in SocialComponent code. Also has lines over 80 characters.
(2) Lines over 80 characters, commented out code left in the patch in GroupMode.
Also, SQL code should be in all CAPS in GroupModel.
(3) The line
if ($name == 'history'||'links') {
in WikiView doesn't make sense.
(|| 'links') will always evaluate to true.
(4) use e() rather than echo. Don't use br tag, use br / (short close so valid xml) or preferably a semantically meaningful set of tags.
(5) The names "pagesThatLink" and "relationshipType" are not following coding conventions (should be caps with _ between words).
yashi2016-10-06 13:02
Hello Professor,
I have incorporated all the changes mentioned by you in the new patch. Please review it. Also, i did not modify Config.php at all(neither this time nor earlier).
Regards,
Yashi
administrator2016-10-07 12:59
Hi Yashi,
The patch still has the config issue mentioned above. There are still trailing whitespaces on several lines. There are still several lines over 80 characters.
The patch needs to give a reasonable message when there is no page that links to the current page.
Best,
Chris
yashi2016-10-07 13:14
Hello Professor,
I observed that few trailing white spaces are still present. I apologize for that. One single white space at the end of each line in SQL query (broken down into multiple lines) has been left intentionally. Rest i will remove. I will also add a message when there is no page linking to the current page.
Apart from these, I am not sure why it says Config.php work directory has been modified when i did not make any changes to it. Please guide me on how it gets modified.
Regards,
Yashi
administrator2016-10-07 15:18
Don't leave the trailing spaces at the end of SQL lines either. If you do a fresh clone now and add your stuff, the work directory line issue in Config.php should be gone.
Best,
Chris
yashi2016-10-08 10:29
Hello Professor,
I did a fresh clone and made all the changes. Please review it.
Thank you and have a great weekend.
Regards,
Yashi
administrator2016-10-08 15:33
Hi Yashi,
When nothing links to a page I get errors:
NOTICE: Undefined index: DISCUSS_THREAD at line 209 in /Applications/MAMP/htdocs/git/yioop/src/views/elements/WikiElement.php
in seekquarry\yioop\views\elements\WikiElement->render, line 84 in /Applications/MAMP/htdocs/git/yioop/src/views/AdminView.php
called from seekquarry\yioop\views\AdminView->renderView, line 214 in /Applications/MAMP/htdocs/git/yioop/src/views/layouts/WebLayout.php
called from seekquarry\yioop\views\layouts\WebLayout->render, line 134 in /Applications/MAMP/htdocs/git/yioop/src/views/View.php
called from seekquarry\yioop\views\View->render, line 289 in /Applications/MAMP/htdocs/git/yioop/src/controllers/Controller.php
called from seekquarry\yioop\controllers\Controller->displayView, line 252 in /Applications/MAMP/htdocs/git/yioop/src/controllers/AdminController.php
...
NOTICE: Undefined index: PAGES at line 1228 in /Applications/MAMP/htdocs/git/yioop/src/views/elements/WikiElement.php
in seekquarry\yioop\views\elements\WikiElement->renderLinkPage, line 273 in /Applications/MAMP/htdocs/git/yioop/src/views/elements/WikiElement.php
called from seekquarry\yioop\views\elements\WikiElement->render, line 84 in /Applications/MAMP/htdocs/git/yioop/src/views/AdminView.php
called from seekquarry\yioop\views\AdminView->renderView, line 214 in /Applications/MAMP/htdocs/git/yioop/src/views/layouts/WebLayout.php
called from seekquarry\yioop\views\layouts\WebLayout->render, line 134 in /Applications/MAMP/htdocs/git/yioop/src/views/View.php
called from seekquarry\yioop\views\View->render, line 289 in /Applications/MAMP/htdocs/git/yioop/src/controllers/Controller.php
...
No page has been linked to this page
Also, when you go to a non empty what links to here page. Besides just listing the pages that link to the page you should have links for each of those pages.
Displaying -1 as the relationship type doesn't mean anything. Use some English text.
Best,
Chris
yashi2016-10-08 15:51
Hello Professor,
I am not able to replicate the error that you got. For pages with no links, I get the message: "No page has been linked to this page". Also, for the time being "-1" has been mentioned. I have already worked on specifying some English text in place of it which is part of the next patch that i have given ( Issue: 182 in Mantis Bug Tracker).
We havn't discussed about adding URL yet. I will stop by your office on Monday and we shall discuss the next steps.
Thank you.
Regards,
Yashi
yashi2016-10-12 18:27
Hello Professor,
I have made all the changes and added hyperlinks to the page names. Please review.
As discussed in today's meeting, there was no error when checked in my code with error reporting on(Regarding your error when no page is linked to a particular page).
Thank you.
Regards,
Yashi
administrator2016-10-13 09:10
Hey Yashi,
Thanks for the patch! I am going to push it although it require some modifications. The text "No page has been linked to this page" was echo'd directly in WikiElement rather than using a localization string. There was also one minor whitespace error when applying the patch. Lines like:
isset($data["ADMIN"]) && $data["ADMIN"];
were replaced with
!empty($data["ADMIN"])
There should be a single whitespace character on either side of || .
You should see your applied patch in the repository shortly. Thanks again for your hard work.
Best,
Chris
yashi2016-10-13 10:51
Hello Professor,
Thank you so much for accepting the patch. I have made a note of these points and will incorporate these practices in the future code.
Have a great day.
Under Manage Groups, we added a drop down: "What Links Here" This link shows you all other wikipedia pages that are linked to this page. So, if a page is related to n different pages, those pages will be displayed here. Thus, relationships between pages can be understood.
Steps to reproduce: The following steps will help to reproduce the added feature: 1. Go to localhost/yioop 2. Under Social->Manage Groups->Click on any new group[Wiki]->Click on the drop down 3. Now choose: What links to this page in the drop down 4. All pages that link to this particular page will be displayed.
Additional information: N/A
Hello Professor, I have added the patch for "What Links Here" feature to be added to Wikipedia pages. Please review. Thank you.
Regards, Yashi
Hey Yashi,
Your patch shouldn't be touching Config.php . Use a LocalConfig.php file if you want to set the WORK_DIRECTORY to a value other than the default. Please make a new patch without the changes to Config.php and post it (this should be a quick change).
Best, Chris
Hello Professor,
I will make the changes tomorrow. Although it is a minor change, i deleted the copy of Yioop on my system that day when i met you (while trying to show you the bug). SO i have to fresh clone Yioop and incorporate all the changes again. Thank you.
Regards, Yashi
Here are some other things that need to be fixed about the patch:
(1) trailing whitespace and excessive indents (8 rather than 4 spaces) in SocialComponent code. Also has lines over 80 characters.
(2) Lines over 80 characters, commented out code left in the patch in GroupMode.
(3) The line if ($name == 'history'||'links') { in WikiView doesn't make sense. (|| 'links') will always evaluate to true.
(4) use e() rather than echo. Don't use br tag, use br / (short close so valid xml) or preferably a semantically meaningful set of tags.
(5) The names "pagesThatLink" and "relationshipType" are not following coding conventions (should be caps with _ between words).
Hello Professor,
I have incorporated all the changes mentioned by you in the new patch. Please review it. Also, i did not modify Config.php at all(neither this time nor earlier).
Regards, Yashi
Hi Yashi,
The patch still has the config issue mentioned above. There are still trailing whitespaces on several lines. There are still several lines over 80 characters. The patch needs to give a reasonable message when there is no page that links to the current page.
Best, Chris
Hello Professor,
I observed that few trailing white spaces are still present. I apologize for that. One single white space at the end of each line in SQL query (broken down into multiple lines) has been left intentionally. Rest i will remove. I will also add a message when there is no page linking to the current page.
Apart from these, I am not sure why it says Config.php work directory has been modified when i did not make any changes to it. Please guide me on how it gets modified.
Regards, Yashi
Don't leave the trailing spaces at the end of SQL lines either. If you do a fresh clone now and add your stuff, the work directory line issue in Config.php should be gone.
Best, Chris
Hello Professor,
I did a fresh clone and made all the changes. Please review it. Thank you and have a great weekend.
Regards, Yashi
Hi Yashi,
When nothing links to a page I get errors:
NOTICE: Undefined index: DISCUSS_THREAD at line 209 in /Applications/MAMP/htdocs/git/yioop/src/views/elements/WikiElement.php
...
NOTICE: Undefined index: PAGES at line 1228 in /Applications/MAMP/htdocs/git/yioop/src/views/elements/WikiElement.php
...
No page has been linked to this page
Also, when you go to a non empty what links to here page. Besides just listing the pages that link to the page you should have links for each of those pages. Displaying -1 as the relationship type doesn't mean anything. Use some English text.
Best, Chris
Hello Professor,
I am not able to replicate the error that you got. For pages with no links, I get the message: "No page has been linked to this page". Also, for the time being "-1" has been mentioned. I have already worked on specifying some English text in place of it which is part of the next patch that i have given ( Issue: 182 in Mantis Bug Tracker). We havn't discussed about adding URL yet. I will stop by your office on Monday and we shall discuss the next steps.
Thank you.
Regards, Yashi
Hello Professor,
I have made all the changes and added hyperlinks to the page names. Please review. As discussed in today's meeting, there was no error when checked in my code with error reporting on(Regarding your error when no page is linked to a particular page). Thank you.
Regards, Yashi
Hey Yashi,
Thanks for the patch! I am going to push it although it require some modifications. The text "No page has been linked to this page" was echo'd directly in WikiElement rather than using a localization string. There was also one minor whitespace error when applying the patch. Lines like:
isset($data["ADMIN"]) && $data["ADMIN"];
were replaced with
!empty($data["ADMIN"])
There should be a single whitespace character on either side of || .
You should see your applied patch in the repository shortly. Thanks again for your hard work.
Best, Chris
Hello Professor,
Thank you so much for accepting the patch. I have made a note of these points and will incorporate these practices in the future code. Have a great day.
Regards, Yashi
Fixed with dae8da42d9
Attachments:
my.patch
my_revised.patch
version3.patch
finalpatchDel04.patch