Need information for the custamization

82 views
Skip to first unread message

A

unread,
Apr 20, 2022, 7:19:20 AM4/20/22
to SubjectsPlus
Dear team,

Can anyone tell me which configuration file is controlling the splux theme homepage guide collection tab and which lines code in index.php? 

Thanks,
AFA

pvillanueva01

unread,
Apr 20, 2022, 9:31:24 AM4/20/22
to SubjectsPlus
Hello AFA,

the content for the Guide Collections Tab on the homepage is set on the Guide Collections screen, listed on the Admin menu. 

../control/admin/guide_collections.php

The screen should look like this (screenshot: guide-collections-interface.png).

The splux theme is set in the Config under "Use a Theme". I tested locally and I was able to see them listed (screenshot: spluxtheme-homepage.png).

In the code for index.php, there is no specific reference to the splux theme or any theme. The guide collections is called on line 169:

$collection_results = listCollections("","2col");

That function can be found in functions.php on line 1963.

I hope this helps.

Patricia

guide-collections-interface.png
spluxtheme-homepage.png

AFA

unread,
Apr 25, 2022, 3:08:33 AM4/25/22
to SubjectsPlus
Thank you so much Patricia,

I needed one more help from you, I am trying to show child guide below parent guide but I am missing something somewhere, can you help me to get this in homepage.
the below thing I try to get those things.
I am Using 4.6 version, splux theme:-

I try to write the mysql query in index.php on line 135 to get the child guide details below to parent guide on homepage in guide collection pages.


    $pills = "<div class=\"feature-light p-3 mb-3\">" . _( "Need to start over? " ) . "<a href=\"index.php\" class=\"no-decoration\">$guide_name</a></div>";

    $q_search = "select *, ss.subject_child from subject, subject_subject ss
    WHERE active = '1'
    AND subject_id = ss. subject_child  
    AND ss.subject_child = $childguide[1]; 
    AND type != 'Placeholder'
    AND subject LIKE '$search_param'
    ORDER BY subject";


    $statement = $connection->prepare( $q_search );
    $statement->execute();
    $r_search = $statement->fetchAll();


and on line 235:-

                $our_item = "<li title=\"{$title_hover}\"><i class=\"fa {$icon}\"></i> <a href=\"$guide_location\" class=\"no-decoration default\">" . htmlspecialchars_decode( $myrow[1] ) . "</a>
     <ul><li>$childguide[1]</li></ul>
            <div class=\"guide_list_bonus\">$list_bonus</div>
            </li>";

charlesbr...@gmail.com

unread,
Apr 25, 2022, 10:50:44 AM4/25/22
to SubjectsPlus
Hello AFA,

I'm looking into the issue right now. I'll get back with you soon.

Thanks,
Charles

charlesbr...@gmail.com

unread,
Apr 27, 2022, 2:00:43 PM4/27/22
to SubjectsPlus
Hello AFA,

I added some code to add the child guides to the Collections Page. 

I did not push it into the main branch yet. We have not decided if we are going to add it to the main codebase. However, you can get the code and add it to your instance by copying the functions.php file to your SubjectsPlus codebase. 

Here is the link to the updated code in functions.php
https://github.com/subjectsplus/SubjectsPlus/blob/cgb-release-461-qa/control/includes/functions.php

I added 2 functions at the end of the file named:
verifyHasChildGuides
getChildGuides

Then I implemented those functions into the listCollections function on line 2043.

Let me know if this works for you.

See image below for an example:
Screen Shot 2022-04-27 at 1.17.20 PM.png

Message has been deleted

AFA

unread,
Apr 28, 2022, 12:26:32 AM4/28/22
to SubjectsPlus
Thank you so much, it is working fine in guide collection tab but this hierarchy tree thing is not showing in subject guide tab on home page..

AFA

unread,
Apr 28, 2022, 6:57:49 AM4/28/22
to SubjectsPlus
Hi  Charles,  I trying the same thing in different tab like subject guide and course guide but it is not showing. Can you help me on this.

charlesbr...@gmail.com

unread,
Apr 28, 2022, 9:02:16 AM4/28/22
to SubjectsPlus
Hello,

I can't do it this week unfortunately, we're extremely busy. But I can tell you where it can be done if you would like to try it yourself. 

You just need to refactor the GuideList class to pull in the child guides. You can use similar mysql statements as I used for the Collections.

The file is located in /lib/SubjectsPlus/Control/GuideList.php starting at line 26.

Thanks,
Charles

AFA

unread,
Apr 29, 2022, 12:50:14 AM4/29/22
to SubjectsPlus
I tried but could not succeed. Actually I am very less familiar with PHP language. can you help me with this i will be very grateful to you.

AFA

unread,
Apr 29, 2022, 1:00:22 AM4/29/22
to SubjectsPlus
I tried to change in index.php on line 197 i added your code "$hasChildGuides = VerifyHasChildGuides($mysubguide[0]);..." and i was successful and parent guid is showing child guid relation but something missing Got css confused and guides not showing in other tabs.

and I changed line 26 mysql query in guidelist.php and it showed parent guide on topic tab but child guide not showing and nothing is showing in other tab like course guide.

Charles Brown-Roberts

unread,
Apr 29, 2022, 11:54:01 AM4/29/22
to subjec...@googlegroups.com
Hello,

I added the code to show associated guides for Subjects, Courses, and Topics.

It's on /subjects/themes/splux/index.php line 235.

Please be aware that your instance of SubjectsPlus is now out of sync with the Main Branch. We do not plan on doing any new releases for version 4. We are currently working on SubjectsPlus 5. 

You can find the updated code here:

Below are screenshots of the code in action.

Thanks,
Charles

Screen Shot 2022-04-29 at 11.30.06 AM.png
Screen Shot 2022-04-29 at 11.49.22 AM.pngScreen Shot 2022-04-29 at 11.50.13 AM.png

--
You received this message because you are subscribed to a topic in the Google Groups "SubjectsPlus" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/subjectsplus/ULRoKf4kV64/unsubscribe.
To unsubscribe from this group and all its topics, send an email to subjectsplus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/subjectsplus/76859508-2ec5-43e9-a7b7-cbd44531b45dn%40googlegroups.com.


--
Go Hurricanes!
Charles Brown-Roberts
Application Developer
University of Miami
http://charlesbrownroberts.com
Twitter:@CaliforniaVol

AFA

unread,
Apr 30, 2022, 6:54:23 AM4/30/22
to SubjectsPlus
Thanks for your help Charles, your help made my job easier. I have attached a screenshot of my theme plus interface. If you will see in my screenshot that child guide comes under parent guide as a companion guide. But it is also showing up as a separate guide in the subject guide tab and another doubt is that I have a python guide to programming languages guide ​​as a kid's guide, and programming languages guide to Computer Science Guide ​​as a kid's guide, it is only showing one associate parent guide. In the Subject Guide tab, the child guide comes under a separate guide along with the parent guide. If you can help me in this it will be very helpful for me in making me my subjectsplus guide.
Screenshot 2022-04-30 160651.png

charlesbr...@gmail.com

unread,
May 4, 2022, 9:49:41 AM5/4/22
to SubjectsPlus
Hello,

Please check your guide associations in the Guide Metadata form. See screenshot for an example.

Screen Shot 2022-05-04 at 9.48.09 AM.png

AFA

unread,
May 7, 2022, 1:07:22 AM5/7/22
to SubjectsPlus
As per your suggestion I looked in metadata page and that is fine (programming language is the child guide of the computer science) . 

Programming language guide which is child guide of computer science subject guide and it is being shown inside computer science guide as an associated guide but programming language guide is also showing separately. I also attached the screenshot to your understanding. My question is how do I want to show the child guide only inside the parent. As of now, it is showing in the hierarchy form as a associated guide inside the parent guide but it also visible in non hierarchy form also. as per your code it is only showing in the parent guide only as a associated guide.
For example in my SubjectsPlus platform the programming language is a child guide of the computer science subject and it is visible as a associated guide in the computer science but it also visible in the different column also in the same tab that I marked as yellow those are child guide that is visible inside the parent guide as well as outside the parent guide. Is there any way to show the child guide only inside the parent guide.

Your help would help me to customize and present the SubjectsPlus interface better.

I have few doubt :
  1. How to enable "Referenced in Pluslets" features in record page
  2. What is the purpose and use of Parent Disciplines in the metadata optional box in the metadata.php.

And one more thing Charles, if possible can you consider and include few features in the SubjectsPlus 5 version like 
  1. Publisher details, 
  2. Subscription details of the records 
  3. There is no provision to add the records source type value in the database.php page 
  4. Guide developer can add the custom value in the drop down option in the format, access restrictions, status field of the record.php form and easily to add those fields in database.php page also.

Screenshot 2022-04-30 160651.png
Reply all
Reply to author
Forward
0 new messages