Page 2 of 2 FirstFirst 12
Results 21 to 28 of 28

Thread: [Module] Integrating WebDeveloperPlus' Featured Content Slider in vba

  1. #21

    Default

    New to the coding thing well not really new but inexperienced. I want to put this in my "Top Colum" but want to either make it larger (images) or have the ability to put something to the right of the images (like an add or something) how would I code that or is it even possible? My width is a little under 1000.

    Thanks in advance.

  2. #22

    Default

    4 days now and not a reply I am guessing this can not be done?

  3. #23

    Default

    yeah it's easily possible. you have to edit the css code that you pasted in the css box. that's where you can edit the size of the images, the actual content box, everything...

  4. #24

    Default

    Thats what I figured but could not figure out how to change that stuff lol, very new to the coding world.

  5. #25

    Default

    if you use Firefox there's an addon called "Firebug" that let's you place your cursor over whatever part of a webpage you want to edit and it shows exactly where that particular piece of code is so you can edit it. You can also edit it through Firebug to see how it looks before editing the actual file...you should check that out. It makes everything waaay easier.

  6. #26

    Default

    Quote Originally Posted by cory_booth View Post
    I saw this post and decided to see if I could make something work and I was able to use some concepts from FPSS (which I purchased a while ago) as well as the info provided here.

    This now will pull posts from designated forums.

    What I need help with is better control and code review by someone better than me...

    Can someone check this out and see if this can be re-written into something more professional?

    One thing I need help with is:
    to keep the script from cutting off a posting midway through a BB or HTML tag and causing errors, I set all BB Parsing to false.

    This leave the tag in place (i.e. [ATTACH], [IMG], etc...)
    Is there a method to drop these tags out of the parsed text (similar to how the email system works or archive) ???



    PHP Code:
    <style>
    #featured{
        width:400px;
        padding-right:150px;
        position:relative;
        border:5px solid #ccc;
        height:250px;
        background:#fff;
    }
    #featured ul.ui-tabs-nav{
        position:absolute;
        top:0; left:400px;
        list-style:none;
        padding:0; margin:0;
        width:150px;
    }
    #featured ul.ui-tabs-nav li{
        padding:1px 0; padding-left:13px;
        font-size:12px;
        color:#666;
    }
    #featured ul.ui-tabs-nav li img{
        float:left; margin:2px 5px;
        background:#fff;
        padding:2px;
        border:1px solid #eee;
    }
    #featured ul.ui-tabs-nav li span{
        font-size:9px; font-family:Verdana;
        line-height:18px;
        border-color: #000;
    }
    #featured li.ui-tabs-nav-item a{
        display:block;
        height:60px;
        color:#333;  background:#fff;
        line-height:20px;
    }
    #featured li.ui-tabs-nav-item a:hover{
        background:#f2f2f2;
    }
    #featured li.ui-tabs-selected{
        background:url('images/selected-item.gif') top left no-repeat;
    }
    #featured ul.ui-tabs-nav li.ui-tabs-selected a{
        background:#ccc;
    }
    #featured .ui-tabs-panel{
        width:400px;
        height:250px;
        background:#999; position:relative;
    }
    #featured .ui-tabs-panel .info{
        position:absolute;
        top:180px; left:0;
        height:70px;
        background: url('images/transparent-bg.png');
        color:#fff;
    }
    #featured .info h2{
        font-size:18px; font-family:Georgia, serif;
        color:#fff; padding:5px; margin:0;
        overflow:hidden;
    }
    #featured .info p{
        margin:0 5px;
        font-family:Verdana; font-size:11px;
        line-height:15px; color:#f0f0f0;
    }
    #featured .info a{
        text-decoration:none;
        color:#fff;
    }
    #featured .info a:hover{
        text-decoration:underline;
    }
    #featured .ui-tabs-hide{
        display:none;
    }
    </style>
    <!-- jQuery - Do you already load this javascript?  (i.e. cometchat) -->
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" ></script>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.5.3/jquery-ui.min.js" ></script>

    <!-- Rotating Code -->
    <script type="text/javascript">
        $(document).ready(function(){
            $("#featured > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 5000, true);
        });
    </script>
    <!-- / Rotating Code -->
    <?php
    $curdir 
    getcwd ();
    chdir('/home/yourdomian/public_html');

    global 
    $db,$vbulletin,$sess$std$INFO$vboptions$session$bbcode;
    // vBulletin: Parse BBCode
    if (!is_object($bbcode_parser)){
        require_once(
    './includes/class_bbcode.php');
        
    $bbcode_parser =& new vB_BbCodeParser($vbulletinfetch_tag_list());
    }

    $forumid                = array(184,149);            // Set forum IDs here.
    $limit                    '2';                // Limit the displayed slides
    $chars                    120;            // Character limit for the slide text, e.g. 100 is 100 characters limit.
    $words                    20;            // Word limit for the slide text, e.g. 20 is 20 words limit
    /* ------------------------------ NOTHING TO CHANGE BELOW THIS LINE ------------------------------ */


    // Start loop
    $forumid implode(',',$forumid);
    $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'];
    }
    $tabhtml="";
    $contenthtml="";
    $div_id 1;

    if (
    $myid) {
    foreach (
    $myid as $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.contentid=p.postid)
        LEFT JOIN "
    .TABLE_PREFIX."forum as f on(t.forumid=f.forumid)
        where t.threadid='
    $threadid'
        ORDER BY attach DESC
        LIMIT 1"
    );

    while (
    $pic $db->fetch_array($getpics)) {
    $replies=$pic['rcount'];
    if (
    $replies=='1') {
    $update="- (1 update)";
    } elseif (
    $replies>'1') {
    $update="- ($replies updates)";
    } else {
    $update="";
    }

    $pic['pagetext'] = $bbcode_parser->do_parse($pic['pagetext'],false,false,false,false,false,false);
    $link "../showthread.php?t=".$threadid."";
    $imagepath "../attachment.php?attachmentid=".$pic['attach'];
    $titleContent ucwords($pic['title']);
    $introtext $pic['pagetext'];

     
    // clean images
    $introtext preg_replace("/<img.+?>/"""$introtext);
     
    // HTML cleanup
    if ($striptags) {
    $introtext strip_tags($introtext$allowed_tags);
    }
    // if character limitation is defined
     
    if ($chars) {
     if(
    function_exists("mb_string")) {
     
    $introtext mb_substr($introtext0$chars).'...';
    } else {
     
    $introtext substr($introtext0$chars).'...';
    }
    }
    // if word limitation is defined
    if ($words) {
    $word_arr str_word_count($introtext2);
    $c 0;
    foreach (
    $word_arr AS $k => $v) {
    if (
    $c == $words) {
    if(
    function_exists("mb_string")) {
    $introtext mb_substr($introtext0$k).'...';
    } else {
    $introtext substr($introtext0$k).'...';
    }
    break;
    }
    $c++;
    }
    }

    $tabhtml .= "<li class='ui-tabs-nav-item' id='nav-fragment-".$div_id."'><a href='#fragment-".$div_id."'>";
    $tabhtml .="<img src='".$imagepath."' height='25px' width='40px' alt='' />";
    $tabhtml .="<span>".$titleContent." ".$update."</span></a></li>";

    $centerhtml .="<div id='fragment-".$div_id."' class='ui-tabs-panel' style=''>";
    $centerhtml .="<img src='".$imagepath."' alt=''/>";
    $centerhtml .="<div class='info'>";
    $centerhtml .="<h2><a href='".$link."'>".$titleContent."</a></h2>";
    $centerhtml .="<p>".$introtext."</p></div></div>";


    $div_id++;
    }
    }

    $db->free_result($getpics);
    unset(
    $pic);
    $db->free_result($getnews);
    unset(
    $news);
    // End loop

    $tabhtml "<div id=\"featured\"><ul class=\"ui-tabs-nav\">".$tabhtml."</ul>";

    echo 
    $tabhtml.$centerhtml."</div>";
    }
    ?>


    Were you able to get this to work? I assume the rotating articles and everything after belongs in a template like the orginal mod?

    Anyone else have any luck on getting this to pull slides from threads?

  7. #27
    Join Date
    May 2007
    Location
    Pakistan
    Posts
    113

    Default

    could i integrate with news forum so it's automatically show on home page or always edit from template for each news
    Mortal Kombat Nexus Online
    Pakistan 1st Mortal Kombat Wesbite

  8. #28
    Join Date
    May 2007
    Location
    Pakistan
    Posts
    113

    Default

    Sorry for double but i want to know if to show 6 slide instead of 4 then what should i do?
    Mortal Kombat Nexus Online
    Pakistan 1st Mortal Kombat Wesbite

Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Need help adding new module (Featured Content Slider)
    By BenIsrael in forum "How Do I..." Questions
    Replies: 1
    Last Post: 03-09-2009, 11:45 AM
  2. Featured Module
    By CasualConvo in forum "How Do I..." Questions
    Replies: 1
    Last Post: 05-30-2008, 01:40 PM
  3. Featured Module in CMPS 3.0
    By juinjuin in forum "How Do I..." Questions
    Replies: 1
    Last Post: 03-31-2008, 01:03 PM
  4. Featured Module
    By ManagerJosh in forum Troubleshooting & Problems
    Replies: 2
    Last Post: 11-28-2007, 09:38 PM
  5. Featured Blog module
    By ludachris in forum Module & Modification Discussion & Requests
    Replies: 0
    Last Post: 11-07-2007, 05:30 PM

Posting Permissions

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