We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18159
    • 4 Posts
    i realy wana see more of this smiley
    sorry my english is not so god ^^
      • 18835
      • 41 Posts
      Thnx for your work. take your time. We all need that smiley
        • 18463
        • 121 Posts
        Martijn van Turnhout Reply #23, 15 years, 5 months ago
        I would love to see this as well! Again: take your time. And if I can donate somewhere, let me know.
          • 34022 ☆ A M B ☆
          • 91 Posts
          OK, I’ve finally got gitHub, MODx packaging, and custom database tables all figured out. Thanks for all of the responses!

          Here’s the current status of the project:

          • I am separating the project into two components: UserUrls (the friendly URL component) and NetworkIt (messaging and connections). NetworkIt will come with an option to enable instant UserUrl integration, although hopefully it will be compatible with any friendly URL setup.
          • I have uploaded my current working version of UserUrls to GitHub: https://github.com/yoleg/UserUrls.
          • UserUrls is almost ready for a preliminary release into the repository, but still needs testing and bug fixes. The URL structure is not very flexible though (which is not very MODx-like), and future releases may change the functionality significantly. URLs are currently set at site.com/username and site.com/username/custom-action.
          • Until NetworkIt comes out, you can use UserUrls with output filters: [tt][[!uuId:userinfo=`fullname`]][/tt], Quip, Profile (Login package), FormIt, Peoples, Gravatar, and more.

          As for donations: I would love testers, feedback, help with documentation, and of course assistance with adding to, improving, or revamping the code. And of course, if you send a client my way that is looking for a social networking website with similar functionality, I can take them on as a paid project and work on this at the same time. Most of the socially-enabled websites I’ve made so far have very business-specific requirements that can’t easily be used for other sites.

          There is one exception though: I have already built the messaging system with dedicated database tables and even a JQuery chat room implementation, and it just need to be cleaned up, made more flexible, and packaged. I’ll definitely be repackaging it as NetworkIt and adding it to GitHub soon.
            WebsiteZen.com - MODX and E-Commerce web development in the San Francisco Bay Area
            • 34022 ☆ A M B ☆
            • 91 Posts
            UserUrls is now in the repository.

            I’ve also put up a component called UserInfo on gitHub, since the Profile snippet had a lot of problems when used with UserUrls (and I needed remote and custom data). UserInfo is compatible with UserUrls - if you don’t specify a user, it will by default look for a userid GET parameter. Just set [tt]&get_prefix=`uu_`[/tt] or to whatever your UserUrls prefix is. It also sets extended, remote, and custom calculated user data in placeholders, and I’ve included a PeoplesPlus snippet, which uses the same user info for its placeholders.

            To install UserInfo, just upload to your MODx install and copy and paste the snippet code into snippets called UserInfo and ProfilePlus. If you know PHP, you can extend the UserInfo class to add custom placeholders such as the UserUrl URL. UserInfo will go into the repository soon after more testing or feedback.
              WebsiteZen.com - MODX and E-Commerce web development in the San Francisco Bay Area
              • 31037
              • 358 Posts
              This sounds really interesting, just whish I had more time so I can test it.

              As I’m just building a community site this sounds perfect!
                • 34022 ☆ A M B ☆
                • 91 Posts
                By the way, one person reported an error with the UserUrls plugin. This error was very similar to one I had experienced earlier, and I assume it has to do with a problem with the UTF-8 conversion.

                Has anyone ever experienced this before? The PHP syntax worked perfectly on Windows, but when moving to the Linux server, it throws a PHP syntax error. Replacing all of the SPACE characters with new space characters fixes the problem. Any ideas on how to troubleshoot something like this?
                  WebsiteZen.com - MODX and E-Commerce web development in the San Francisco Bay Area
                  • 34022 ☆ A M B ☆
                  • 91 Posts
                  I’m sketching out a schema for NetworkIt but would like to get some feedback before continuing. Once the schema is somewhat finalized and I get some free time, I will start converting all of the NetworkIt code into a full transport package. I will be using GitHub in case anyone wants to help or give feedback.

                  The latest version of the schema is at: https://github.com/yoleg/NetworkIt/blob/master/core/components/networkit/model/schema/networkit.mysql.schema.xml

                  And here is the schema at the time of this post:
                  <?xml version="1.0" encoding="UTF-8"?>
                  <model package="NetworkIt" baseClass="xPDOObject" platform="mysql" defaultEngine="MyISAM">
                  
                      <!-- will be used for anything from chatrooms to private messages -->
                      <!-- the attributes field is meant for attaching site-specific info, such as the page or group it originated from -->
                      <!-- example: to have multiple chatrooms, set the attributes for each message to chat1, chat2, etc... depending on the room ID -->
                      <!-- example: to have a private conversation, set the "from" and "to" fields to the appropriate userids and set "private" to 1 -->
                      <object class="NetworkMessage" table="networkit_messages" extends="xPDOSimpleObject">  
                          <field key="attributes" dbtype="varchar" precision="20" phptype="string" null="false" default="" />  
                          <field key="name" dbtype="varchar" precision="???" phptype="string" null="false" default="" />  
                          <field key="subject" dbtype="varchar" precision="???" phptype="string" null="false" default="" />  
                          <field key="message" dbtype="varchar" precision="???" phptype="string" null="false" default="" />  
                          <field key="from" dbtype="int" precision="10" attributes="unsigned" phptype="integer" null="false" default="0" />
                          <field key="to" dbtype="int" precision="10" attributes="unsigned" phptype="integer" null="false" default="0" />
                          <field key="private" dbtype="int" precision="1" attributes="unsigned" phptype="integer" null="false" default="0" />  
                          <field key="active" dbtype="int" precision="1" attributes="unsigned" phptype="integer" null="false" default="0" />  
                          <field key="timestamp" dbtype="datetime" phptype="datetime" null="true" index="index" />
                          <!-- Should these be separated out into a separate networkit_message_info table for extending like ModUser? -->
                          <field key="createdby" dbtype="int" precision="10" attributes="unsigned" phptype="integer" null="false" default="0" />
                          <field key="receivedon" dbtype="datetime" phptype="datetime" null="true" index="index" />
                          <field key="receivedby" dbtype="int" precision="10" attributes="unsigned" phptype="integer" null="false" default="0" />
                          <field key="editedon" dbtype="datetime" phptype="datetime" null="true" />
                          <field key="editedby" dbtype="int" precision="10" attributes="unsigned" phptype="integer" null="false" default="0" />
                          <field key="extended" dbtype="varchar" precision="???" phptype="string" null="false" default="" />  
                          <aggregate alias="CreatedBy" class="modUser" local="createdby" foreign="id" cardinality="one" owner="foreign" />
                          <aggregate alias="EditedBy" class="modUser" local="editedby" foreign="id" cardinality="one" owner="foreign" />
                          <!-- modUser -->
                      </object>
                      
                      <!-- for ajax chat scripts to record latest activity (E.G. chatrooms) -->
                      <!-- Identifiers are for stuff like IP, cookie ID, etc... -->
                      <!-- Should this be separated out into a separate package or as a module? -->
                      <object class="NetworkActivity" table="networkit_activity" extends="xPDOSimpleObject"> 
                          <field key="name" dbtype="varchar" precision="30" phptype="string" null="false" default="" />  
                          <field key="userid" dbtype="int" precision="10" attributes="unsigned" phptype="integer" null="false" default="0" />
                          <field key="attributes" dbtype="varchar" precision="20" phptype="string" null="false" default="" />  
                          <field key="timestamp" dbtype="datetime" phptype="datetime" null="true" index="index" />
                          <field key="identifier1" dbtype="varchar" precision="128" phptype="string" null="false" default="" />  
                          <field key="identifier2" dbtype="varchar" precision="128" phptype="string" null="false" default="" />  
                          <field key="identifier3" dbtype="varchar" precision="128" phptype="string" null="false" default="" />  
                          <aggregate alias="User" class="modUser" local="userid" foreign="id" cardinality="one" owner="foreign" />
                          <!-- ModUser -->
                      </object>
                  
                      <!-- a group can be anything from a friend connection between two people to mass mailing lists or fan bases -->
                      <object class="NetworkGroup" table="networkit_groups" extends="xPDOSimpleObject">  
                          <!-- Types will be site-defined. Should there be a separate table for group types? -->
                          <field key="type" dbtype="varchar" precision="128" phptype="string" null="false" default="" />  
                          <field key="createdon" dbtype="datetime" phptype="datetime" null="true" index="index" />
                          <field key="createdby" dbtype="int" precision="10" attributes="unsigned" phptype="integer" null="false" default="0" />
                          <field key="approvedon" dbtype="datetime" phptype="datetime" null="true" />
                          <field key="approvedby" dbtype="int" precision="10" attributes="unsigned" phptype="integer" null="false" default="0" />
                          <field key="cancelledon" dbtype="datetime" phptype="datetime" null="true" />
                          <field key="cancelledby" dbtype="int" precision="10" attributes="unsigned" phptype="integer" null="false" default="0" />
                      </object>
                      
                      <!-- group members -->
                      <!-- Example: To make a "friend" connection between two people, just create a separate group and add only two members to it -->
                      <!-- Example: To make a "fanbase", create a group and add a bunch of people to it -->
                      <object class="NetworkGroupUser" table="networkit_groupusers" extends="xPDOSimpleObject">  
                          <field key="group" dbtype="int" precision="10" attributes="unsigned" phptype="integer" null="false" default="0" />
                          <field key="user" dbtype="int" precision="10" attributes="unsigned" phptype="integer" null="false" default="0" />        
                          <field key="createdon" dbtype="datetime" phptype="datetime" null="true" index="index" />
                          <field key="createdby" dbtype="int" precision="10" attributes="unsigned" phptype="integer" null="false" default="0" />
                          <field key="editedon" dbtype="datetime" phptype="datetime" null="true" />
                          <field key="editedby" dbtype="int" precision="10" attributes="unsigned" phptype="integer" null="false" default="0" />
                          <field key="type" dbtype="varchar" precision="20" phptype="string" null="false" default="" />  
                          <field key="attributes" dbtype="varchar" precision="20" phptype="string" null="false" default="" />  
                          <field key="extended" dbtype="varchar" precision="128" phptype="string" null="false" default="" />  
                          <field key="active" dbtype="int" precision="1" attributes="unsigned" phptype="integer" null="false" default="0" />  
                          
                          <aggregate alias="Group" class="NetworkGroup" local="group" foreign="id" cardinality="one" owner="foreign" />
                          <aggregate alias="Users" class="modUser" local="user" foreign="id" cardinality="one" owner="foreign" />
                      </object>
                  </model>
                  


                  As you can see from the comments, I am trying to make it much more flexible than the original NetworkIt. Messages should be anything from chatroom posts to private conversations, and groups should be anything from a friendship between two people to a huge fanbase.... unless there is a reason to make it more specific?

                  I would definitely appreciate comments and suggestions for the schema/ database structure. I know it can be changed later through resolvers, but I would like to get it as close to "right" as I can before I start actually writing the code.
                    WebsiteZen.com - MODX and E-Commerce web development in the San Francisco Bay Area
                    • 21838
                    • 284 Posts
                    Any news on that? I’m not a perfect developer so I don’t know if scheme is okay.

                    But are there any working scripts right now I can use to get a fb-user-wall on a MODX site?
                      MODX Free Template Base: MODX-Boilerplate | my blog (lots of MODX stuff) | my gitHub (translations) | MODX User Groups Germany (Facebook)
                      • 34022 ☆ A M B ☆
                      • 91 Posts
                      Check page 1 of this forum topic - there is a transport package in there, but you will need to follow some instructions to get it working.
                        WebsiteZen.com - MODX and E-Commerce web development in the San Francisco Bay Area