Results 1 to 8 of 8

Thread: Getting Dynamics Working With FrontPage Slideshow

  1. #1
    Join Date
    Nov 2007
    Posts
    87

    Default Getting Dynamics Working With FrontPage Slideshow

    Want to get FrontPage Slideshow working with Dynamics threads. Maybe this is easy, just don't know where to start. Any interest in helping?

    Installations steps for Frontpage Slideshow here:

    http://www.vbadvanced.com/forum/showthread.php?t=32193

  2. #2
    Join Date
    Sep 2007
    Posts
    24

    Default

    Sure, I actually just installed this and got it up and running on my site last week. Here's an example:

    http://www.simgamingnetwork.com/?styleid=10

    It only appears in that style since my homepage/layout is still very much under construction.

    I followed the normal install for vbulletin that came with the mod, not the instructions at the link you provided.

    I then created a new template module in vbulletin under admincp -> vBa Dynamics -> Add Module. Name it whatever you want and put this in for the code:

    Code:
    <tr>
    <td class="$bgclass">$jwfpss</td>
    </tr>
    Add the module to whatever page you want it to appear on.

    I then modified the SQL queries in mod_fpslidehow.php to pull from dynamics instead of vbulletin. Please note that I didn't change any variable names or SQL aliases, just edited the table and field names in the queries. This code also assumes your table prefix for dynamics is adv_dyna_

    I'll try to list the changes:

    Enter the category id's for the dynamics categories you want the slideshow to pull from on this line:
    Code:
    $forumid = array(2,3,4); // Set forum IDs here.
    FIND:
    Code:
    $getnews = $db->query_read("SELECT threadid from ".TABLE_PREFIX."thread WHERE attach !='0' AND forumid in($forumid) ORDER by sticky DESC, threadid DESC LIMIT $limit");
    while ($news = $db->fetch_array($getnews)) {
    	$myid[]=$news['threadid'];
    }
    REPLACE WITH:
    Code:
    $getnews = $db->query_read("SELECT entryid from adv_dyna_entries WHERE hasattach !='0' AND catid in($forumid) ORDER by sticky DESC, entryid DESC LIMIT $limit");
    while ($news = $db->fetch_array($getnews)) {
    	$myid[]=$news['entryid'];
    }
    FIND:
    Code:
    $getpics = $db->query_read("SELECT t.threadid as tid, t.title as title,t.replycount as rcount, p.pagetext as pagetext,a.attachmentid as attach,f.forumid as forumid,f.title as forum from ".TABLE_PREFIX."thread as t
    	LEFT JOIN ".TABLE_PREFIX."post as p on(t.firstpostid=p.postid)
    	LEFT JOIN ".TABLE_PREFIX."attachment as a on(a.postid=p.postid)
    	LEFT JOIN ".TABLE_PREFIX."forum as f on(t.forumid=f.forumid)
    	where t.threadid='$threadid' 
    	ORDER BY attach DESC
    	LIMIT 1");
    REPLACE WITH:
    Code:
    $getpics = $db->query_read("SELECT t.entryid as tid, t.title as title,t.posts as rcount, p.pagetext as pagetext,a.attachmentid as attach,f.catid as forumid,f.title as forum from adv_dyna_entries as t
    		LEFT JOIN adv_dyna_entries_pages as p on(t.entryid=p.entryid)
    		LEFT JOIN adv_dyna_attachments as a on(a.entryid=p.entryid)
    		LEFT JOIN adv_dyna_categories as f on(t.catid=f.catid)
    		where t.entryid='$threadid' 
    		ORDER BY attach DESC
    		LIMIT 1");
    FIND:
    Code:
    		foreach ($myid as $key => $threadid) {
    			$getpics = $db->query_read("SELECT t.threadid as tid, t.title as title,t.replycount as rcount, p.pagetext as pagetext,a.attachmentid as attach,f.forumid as forumid,f.title as forum from ".TABLE_PREFIX."thread as t
    			LEFT JOIN ".TABLE_PREFIX."post as p on(t.firstpostid=p.postid)
    			LEFT JOIN ".TABLE_PREFIX."attachment as a on(a.postid=p.postid)
    			LEFT JOIN ".TABLE_PREFIX."forum as f on(t.forumid=f.forumid)
    			where t.threadid='$threadid' 
    			ORDER BY attach DESC
    			LIMIT 1");
    REPLACE WITH:
    Code:
    foreach ($myid as $key => $threadid) {
    			$getpics = $db->query_read("SELECT t.entryid as tid, t.title as title,t.posts as rcount, p.pagetext as pagetext,a.attachmentid as attach,f.catid as forumid,f.title as forum from adv_dyna_entries as t
    				LEFT JOIN adv_dyna_entries_pages as p on(t.entryid=p.entryid)
    				LEFT JOIN adv_dyna_attachments as a on(a.entryid=p.entryid)
    				LEFT JOIN adv_dyna_categories as f on(t.catid=f.catid)
    				where t.entryid='$threadid' 
    				ORDER BY attach DESC
    				LIMIT 1");
    This next section fixes the links so might vary depending on where your dynamics is installed.

    FIND:
    Code:
    $link = "showthread.php?t=".$threadid."";
    REPLACE WITH:
    Code:
    $link = "showentry.php?e=".$threadid."";
    FIND:
    Code:
    $navlink = "showthread.php?t=".$threadid."";
    REPLACE WITH:
    Code:
    $navlink = "showentry.php?e=".$threadid."";

    I think that's it. Let me know if you have any trouble.
    Last edited by camulos; 12-10-2008 at 05:13 PM.

  3. #3
    Join Date
    Nov 2007
    Posts
    87

    Default Slight Problem

    Quote Originally Posted by camulos View Post
    Sure, I actually just installed this and got it up and running on my site last week. Here's an example:

    http://www.simgamingnetwork.com/?styleid=10

    I think that's it. Let me know if you have any trouble.
    If I have dynamics stored in the /dynamics folder and forums stored in the /forums folder, how would that change your instructions?

    I did everything you listed and it shows the attached images and text, but it doesn't show in the SlideShow box. I've been playing around with it, but can't figure it out. It must be a path problem, right?

    It's pulling up the images and text, but not the light box. Any suggestions?
    Last edited by drynax; 12-11-2008 at 01:48 AM.

  4. #4
    Join Date
    Nov 2007
    Posts
    87

    Default

    Okay, I put the /fpss folder in both the forums, /forums/fpss, and in dynamics, /dynamics/fpss, and that appeared to make it work. For vbadvanced, I had to put it in the root folder. But I would prefer to have it in just only one directory instead of three.

    Any idea how to do that (based on the instructions above)?
    Last edited by drynax; 12-11-2008 at 03:16 AM.

  5. #5
    Join Date
    Sep 2007
    Posts
    24

    Default

    I think you need to edit the path in the plugin you created. In admincp go to plugins and products -> plugin manager. Edit the FPSS plugin you created. Edit the path in the include statement to the correct path in relation to vbulletin.

    For example mine is:

    Code:
    ob_start();
       include('../fpss/mod_fpslideshow.php');
       $jwfpss = ob_get_contents();
    ob_end_clean();
    This is with dynamics and the fpss folder installed at the root of my site.

  6. #6
    Join Date
    Nov 2007
    Posts
    87

    Default

    Quote Originally Posted by camulos View Post
    I think you need to edit the path in the plugin you created. In admincp go to plugins and products -> plugin manager. Edit the FPSS plugin you created. Edit the path in the include statement to the correct path in relation to vbulletin.

    For example mine is:

    Code:
    ob_start();
       include('../fpss/mod_fpslideshow.php');
       $jwfpss = ob_get_contents();
    ob_end_clean();
    This is with dynamics and the fpss folder installed at the root of my site.
    That fixed it. Thank you so much!!!!!

  7. #7

    Default

    hi
    Would this work with 3.8.4/1.2.0, I tried with 3.8.4/3.2.1 and it did not work.

    regards

    Hani

  8. #8
    Join Date
    Sep 2007
    Posts
    24

    Default

    Not sure, I'm still on vB 3.7 so haven't tried.

    I'm planning on upgrading to 3.8.4 but I have so much custom code now that it might be more work than it's worth.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Frontpage Slideshow
    By Teemberland in forum Module & Modification Discussion & Requests
    Replies: 89
    Last Post: 01-18-2011, 10:37 AM
  2. Slideshow for CMPS wanted (not vBCover or Frontpage SlideShow)
    By pcoskat in forum Module & Modification Discussion & Requests
    Replies: 2
    Last Post: 11-26-2008, 11:39 PM
  3. Frontpage Slideshow error
    By liberty2 in forum Module & Modification Discussion & Requests
    Replies: 2
    Last Post: 11-26-2008, 11:07 PM
  4. Slideshow for Dynamics (Request)
    By Pauleh in forum Module & Modification Discussion & Requests
    Replies: 2
    Last Post: 10-22-2008, 05:29 PM
  5. Replies: 1
    Last Post: 09-24-2007, 11:40 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •