nukeSEO.com - PHPNuke SEO Search engine optimization, professional tools including nukeSEO, nukeSPAM, nukeFEED, nukePIE, nukeWYSIWYG and more

 

. Welcome to nukeSEO.com  ! 
.
.
.


.
nukeSEO.com: Forums


 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The many uses of nukeDH
 
 
Post new topic   Reply to topic    nukeSEO.com Forum Index -> General / Other Stuff
View previous topic :: View next topic  
Author Message
spasticdonkey
webmaster


Joined: Oct 26, 2007
Posts: 69

PostPosted: Tue Aug 02, 2011 4:01 pm    Post subject: The many uses of nukeDH Reply with quote

Thought I would take a moment to discuss some of the possible uses of the nukeDH system, as a recent post by montego jarred my memory Rolling Eyes

montego wrote:
BTW, I have felt for a long time that the new nukeSEO DH code/classes could be potentially extended and/or exploited for better control over ShortLinks! Ok, there, I've said it in public and let the cat out of the bag... Wink

We have in DH the up-front architecture for pulling key data elements from the database that is by module and by ID. I was going to extend this approach to also build more friendly keyword/title "rich" shortened links. This was going to be the basis for my 2.0 version (only in the "brainstorm" stage atm).

It stands to reason, then, that this same "extension" or DH already, could be leveraged for this Diqus need as well? Why not have a DH object that is a Singleton which can then be called upon anywhere within the RN/module/block code to get at these really nice content attributes... Wink

Hopefully this makes some sense.


That sounds exciting montego, especially the friendly keyword/title "rich" shortened links!

This was discussed some time ago on raven's site, but we are rapidly approaching the need for a global tags system (nukeTAGS).. Instead of Content Plus and TON both using their own tag system, it would be much more ideal to have a global system that could return results from multiple modules. INO, the nukeDH system seems like a good foundation to build upon..

Another idea I have actually implemented on a dev site, is a "smart menu" that uses the DH system to dynamically build the menu depending on the given page.. For instance if the user is in the Content module, automatically add a submenu listing all the Content categories; and if the user is viewing a Content category add another submenu with the content pages in that category. Also added a "you are here" functionality to the menu as well. Although I'm using a different menu script this is still nukeNAV Wink

Image

I have more ideas, but that's enough for one post Smile
  
Back to top
View user's profile Send private message Visit poster's website
montego
webmaster


Joined: Dec 26, 2005
Posts: 254

PostPosted: Tue Aug 02, 2011 5:12 pm    Post subject: Reply with quote

Thank you for this post/thread Spastic. It is funny when you mentioned a Tag system, my immediate thought was a resurrected mSearch. Similar... yet different. Wink Almost makes you want to consider all "content" to be stored in a centralized table structure, common to all content, to make these kinds of extensions even easier to implement.

It seems to me that most content has very similar components to it such as:
- Some form of category/sub-category/tree structure
- Some kind of title
- Some kind of content body
- Posting date/time
- Maybe keywords?

Then place onto this a generic commenting system...

Then possibly throw in a configurable templating system for displaying the content... oh, then you have a completely different CMS. lol.
_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login!
  
Back to top
View user's profile Send private message Visit poster's website
kguske
Site Admin
Site Admin


Joined: May 12, 2005
Posts: 876

PostPosted: Wed Aug 03, 2011 11:40 am    Post subject: Reply with quote

Nice menu, spasticdonkey!

montego, re mSearch: that's in the back of my mind, too, in conjunction with a nukeSEO DH-based sitemap. The original nukeSEO Sitemap module was based on mSearch concepts, too, since a sitemap, after all, is a search of everything...

Regarding a different CMS - some like Drupal and Joomla store most content in a single table, which eliminates the needs for most (but not all) of the classes in DH.
_________________
  
Back to top
View user's profile Send private message Visit poster's website
spasticdonkey






PostPosted: Thu Aug 04, 2011 1:16 pm    Post subject: Reply with quote

Well I'm anxious to try some dh powered addons, but also curious about how some more experienced coders might approach it... @ current all I did to retrieve the info I needed was:

Code:
$whodatCat = $dh->getCatID();

$whatdatItem = $dh->getContentID();


then based my logic on $name and those results..
  
Back to top
montego






PostPosted: Fri Aug 05, 2011 11:55 am    Post subject: Reply with quote

spasticdonkey,

Yes, I do think it is that simple, but my only concern with the current implementation is its ability to be used throughout RN, including module code. It is not currently defined as a Singleton structure object-wise and I would hate to just pass around an object pointer in something like $_GLOBALS.

I was going to see if the classes could be easily extended into that kind of framework. Just won't have the time for quite awhile I'm afraid.
  
Back to top
Palbin
webmaster


Joined: Nov 28, 2007
Posts: 38

PostPosted: Sun Aug 21, 2011 8:51 pm    Post subject: Reply with quote

I would think something like this would work fine.
Code:


   private static $instance = false;
   /**
   * Get instance of db class
   */
   public static function getInstance() {
      if(!self::$instance) {
         self::$instance = new self();
      }
      return self::$instance;
   }

Code:


$db = 'dh' . $name::getInstance();
  
Back to top
View user's profile Send private message
spasticdonkey






PostPosted: Fri Nov 25, 2011 6:18 pm    Post subject: Reply with quote

Somehow I missed this post... Tried out the code, and I guess I'm not exactly sure how to implement it.. ??

I'm trying to determine the CatID, SubCatID, or ContentID of any given page. For instance to create a breadcrumb navigation in the footer of a custom theme
  
Back to top
Palbin






PostPosted: Fri Nov 25, 2011 9:29 pm    Post subject: Reply with quote

spasticdonkey, my comment was more directed at what montego was saying in regards to the singleton class. If you where to add the following to the end of the dhclass class in dh.class.php you would not have to globalize $dh.

Code:


   private static $instance = false;
   /**
   * Get instance of db class
   */
   public static function getInstance() {
      if(!self::$instance) {
         self::$instance = new self();
      }
      return self::$instance;
   }

Note: The end of the file is not the end of the class.

You would then be able to call the particular extended dh class from anywhere without globalizing the class object ($dh).

Code:


$dh = 'dh' . $name::getInstance();


In the above code $name would be the name of the module. "'dh' . $name" needs to equal the name of a file in /includes/nukeSEO/dh/.
  
Back to top
spasticdonkey






PostPosted: Mon Feb 13, 2012 12:55 pm    Post subject: Reply with quote

Well I'm afraid implementing some of what was discussed here is still a bit above my pay grade.. Once again in need of a system to generate unique ID's for pages, this time in working on a mobile theme; it would sure be nice to tap into nukeDH for this..

In my current "app" I have a customized mobile/html5 navigational menu based on nukeNAV, so I don't need nukeNAV to generate a menu in the traditional sense. I can override the nukeNAV $file easily, and my hope was to use it to pass an array of settings instead. The following code works but is only executed for admins. It allows me to pass the DH info as well as the SEO link for admins.

Code:
if(defined('MODULE_FILE') and is_admin($admin)) {

   $parms = $pageID = $catID = $subcatID = '';
   $dhID = $dh->getContentID();
   if ($dhID > 0) $parms .= '&dhID=' . $dhID;
   $dhCat = $dh->getCatID();
   if ($dhCat > 0) $parms .= '&dhCat=' . $dhCat;
   $dhSubCat = $dh->getSubCatID();
   if ($dhSubCat > 0) $parms .= '&dhSubCat=' . $dhSubCat;
   if (defined('HOME_FILE') and HOME_FILE) $parms .= '&index=y';
   $nukeNAV = array(
   'dhID' => $dhID,
   'dhCat' => $dhCat,
   'dhSubCat' => $dhSubCat,
   'seo' => 'modules.php?name=nukeNAV&op=SEO&dhName=' . $name . $parms,     
);


Obviously if used to generate page id's it would have to be executed every page load. So my question being, is something like this effecient enough to use in this manner, for the time-being? Note that I will use different logic for id's for the admin area, and it's not vital that "every" page have a unique id. Although if they do have unique id's it opens up all sorts of options for binding scripts to events of the jquery mobile framework (JQM). For instance, document.ready only works on the first page load in JQM (AJAX), so if you want to make sure the DOM has fully loaded for future pages, you need to bind to mobile events instead.

On a related side-note:
Although it's questionable how often someone would try to edit meta tags for their site on their mobile device, I'm striving for as fully functional as possible; and managed to get the nukeSEO DH dialogs working correctly Smile
Only registered users can see links on this board! Get registered or login!
Just FYI: This is still working on the approach of only 3 minor core edits to header.php, footer.php, and get_theme()
  
Back to top
Display posts from previous:       
Post new topic   Reply to topic    nukeSEO.com Forum Index -> General / Other Stuff All times are GMT - 5 Hours
 
 Page 1 of 1

 

Jump to:   
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001-2008 phpBB Group


Page Generation: 0.08 Seconds