Announcement

Collapse
No announcement yet.

This day in History??

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #31
    Originally posted by glennrocksvb View Post
    Maybe there are no events in the calendar that match today's date? Try running the SQL query in phpMyAdmin to see if there are records returned.
    how do that?
    also i just added two events for today

    Comment


      #32
      work dude!!
      the format sucks lol, is that easy to chnage??Click image for larger version

Name:	dates.png
Views:	108
Size:	76.3 KB
ID:	26631

      Comment


        #33
        hey dude how can i make layout liked pictured??
        I promise once I pay for this, surgery, ill shoot you some donations
        Click image for larger version  Name:	layout.png Views:	0 Size:	45.5 KB ID:	26633

        Comment


          #34
          I'm not home right now. But you can inspect (right click > Inspect) the HTML structure of that Recent Posts widget. Do the same HTML tags and CSS classes for the Today in History widget.
          Helpful? Donate. Thanks!
          Buy me a coffeePayPal QR Code
          Fast VPS Host for vBulletin:
          A2 Hosting & IONOS

          Comment


            #35
            Originally posted by glennrocksvb View Post
            I'm not home right now. But you can inspect (right click > Inspect) the HTML structure of that Recent Posts widget. Do the same HTML tags and CSS classes for the Today in History widget.
            im useless dude

            Comment


              #36
              Can you post the HTML for the Recent Posts widget?
              Helpful? Donate. Thanks!
              Buy me a coffeePayPal QR Code
              Fast VPS Host for vBulletin:
              A2 Hosting & IONOS

              Comment


                #37
                I believe this is it..

                PHP Code:
                <li>
                    <
                div class="block smaller">
                        <
                div class="blocksubhead">
                            <
                class="collapse" id="collapse_block_newthreads_{vb:raw blockinfo.blockid}" href="{vb:raw relpath}#top"><img alt="" src="{vb:stylevar imgdir_button}/collapse_40b.png" id="collapseimg_newthreads_{vb:raw blockinfo.blockid}"/></a>
                            <
                img src="{vb:stylevar imgdir_cms}/widget-forum.png" alt="" />
                            <
                span class="blocktitle">{vb:raw blockinfo.title}</span>
                        </
                div>
                        <
                div class="widget_content blockbody floatcontainer">
                        <
                ul id="block_newthreads_{vb:raw blockinfo.blockid}" class="blockrow">
                            <
                vb:each from="threads" key="threadid" value="thread">
                            <
                li class="<vb:if condition="!$vboptions['avatarenabled']">no</vb:if>avatarcontent floatcontainer widget_post_bit">
                                <
                div class="widget_post_userinfo">
                                <
                vb:if condition="$vboptions['avatarenabled']">
                                <
                div class="cms_widget_post_useravatar widget_post_useravatar">
                                    <
                vb:if condition="$thread['userid']">
                                        <
                class="smallavatar comments_member_avatar_link" href="{vb:link member, {vb:raw thread}}">
                                    </
                vb:if>
                                        <
                vb:if condition="$thread['showavatar']">
                                        <
                img src="{vb:raw thread.avatarurl}" alt="{vb:raw thread.postusername}" />
                                        <
                vb:else />
                                        <
                img src="{vb:stylevar imgdir_misc}/unknown.gif" alt="{vb:raw thread.postusername}" />
                                        </
                vb:if>
                                    <
                vb:if condition="$thread['userid']">
                                        </
                a>
                                    </
                vb:if>
                                </
                div>
                                </
                vb:if>
                                </
                div>
                                <
                div class="smallavatartext widget_post_comment<vb:if condition="!$vboptions['avatarenabled']">_noavatar</vb:if>">
                                    <
                h5 class="widget_post_header"><a href="{vb:raw thread.url}" class="title">{vb:raw thread.title}</a></h5>
                                    <
                div class="meta">
                                        <
                vb:if condition="$threadstype == 0">
                                        {
                vb:stylevar dirmark} {vb:rawphrase posted_by} <vb:if condition="$thread['userid']"><a href="{vb:link member, {vb:raw thread}}">{vb:raw thread.postusername}</a><vb:else />{vb:raw thread.postusername}</vb:if> {vb:stylevar dirmark}({vb:rawphrase x_replies, {vb:raw thread.replycount}})
                                        <
                br />{vb:raw thread.date}<vb:if condition="!$show['detailedtime']">, <span class="time">{vb:raw thread.time}</span></vb:if> {vb:rawphrase in_x, {vb:link forum, {vb:raw thread}, null'forumid''forumtitle'}, {vb:raw thread.forumtitle}}
                                        <
                vb:else />
                                        {
                vb:stylevar dirmark}{vb:rawphrase last_post_by} <vb:if condition="$thread['lastposterid']"><a href="{vb:link member, {vb:raw thread}, null, 'lastposterid', 'lastposter'}">{vb:raw thread.lastposter}</a><vb:else />{vb:raw thread.lastposter}</vb:if> {vb:stylevar dirmark}({vb:rawphrase x_replies, {vb:raw thread.replycount}})
                                        <
                br />
                                        {
                vb:raw thread.lastpostdate}<vb:if condition="!$show['detailedtime']">, <span class="time">{vb:raw thread.lastposttime}</span></vb:if> {vb:rawphrase in_x, {vb:link forum, {vb:raw thread}, null'forumid''forumtitle'}, {vb:raw thread.forumtitle}}
                                        </
                vb:if>
                                    </
                div>
                                </
                div>
                            </
                li>
                            </
                vb:each>
                        </
                ul>
                        </
                div>
                    </
                div>
                    <
                div class="underblock"></div>
                </
                li>​ 

                Comment


                  #38
                  Without running the code myself, this is a wild guess.

                  Change the block of code with $output_bits .= sprintf( with this block:

                  PHP Code:
                  $output_bits .= sprintf("
                      <li class="
                  noavatarcontent floatcontainer widget_post_bit">
                          <div class="
                  widget_post_userinfo"></div>
                          <div class"
                  smallavatartext widget_post_comment_noavatar">
                              <h5 class="
                  widget_post_header">
                                  <a href="
                  calendar.php?do=getinfo&e=%d" class="title">%s</a>
                              </h5>
                              <div class="
                  meta">%s</div>
                          </div>
                      </li>"
                  ,
                      
                  $event["eventid"],
                      
                  $event["title"],
                      
                  $format
                  );​​ 
                  Helpful? Donate. Thanks!
                  Buy me a coffeePayPal QR Code
                  Fast VPS Host for vBulletin:
                  A2 Hosting & IONOS

                  Comment


                    #39
                    got this..


                    PHP Code:
                    syntax errorunexpected 'noavatarcontent' (T_STRING), expecting ',' or ')' on line 15 in /home/james/public_html/forum/includes/block/html.php(95) : eval()'d code
                    #0 /home/james/public_html/forum/includes/class_block.php(130): vB_BlockType_Html->getData()
                    #1 /home/james/public_html/forum/includes/class_block.php(1088): vB_Block->getBlockHTML()
                    #2 /home/james/public_html/forum/includes/class_block.php(1101): vB_BlockManager->getBlockHTML(4, Array)
                    #3 /home/james/public_html/forum/forum.php(649): vB_BlockManager->getSidebarHTML()
                    #4 {main}
                    ​ 

                    Comment


                      #40
                      The post removed the backslash character in the code. I think that's a bug in the editor. You'd have to type double backslashes to display a single slash when post is saved.

                      Try this updated code:

                      PHP Code:
                      $output_bits .= sprintf("
                          <li class=\"noavatarcontent floatcontainer widget_post_bit\">
                              <div class=\"widget_post_userinfo\"></div>
                              <div class=\"smallavatartext widget_post_comment_noavatar\">
                                  <h5 class=\"widget_post_header\">
                                      <a href=\"calendar.php?do=getinfo&e=%d\" class=\"title\">%s</a>
                                  </h5>
                                  <div class=\"meta\">%s</div>
                              </div>
                          </li>"
                      ,
                          
                      $event["eventid"],
                          
                      $event["title"],
                          
                      $format
                      );​ 
                      Helpful? Donate. Thanks!
                      Buy me a coffeePayPal QR Code
                      Fast VPS Host for vBulletin:
                      A2 Hosting & IONOS

                      Comment


                        #41
                        what im i removing??

                        Comment


                          #42
                          I was referring to my post. Just copy the latest code I posted.
                          Helpful? Donate. Thanks!
                          Buy me a coffeePayPal QR Code
                          Fast VPS Host for vBulletin:
                          A2 Hosting & IONOS

                          Comment


                            #43
                            Yea, but where does it go into?

                            Comment


                              #44
                              That is the replacement code for the code I posted in post #38
                              Helpful? Donate. Thanks!
                              Buy me a coffeePayPal QR Code
                              Fast VPS Host for vBulletin:
                              A2 Hosting & IONOS

                              Comment


                                #45
                                Originally posted by glennrocksvb View Post
                                That is the replacement code for the code I posted in post #38
                                replace the whole block code, or replace a piece of the code. See below.
                                Also i did use that code and replaced the whole box and I got nothing

                                PHP Code:
                                ob_start();
                                global 
                                $db,$vbulletin;


                                $mydate =  mktime(000date("m"), date("d")-1date("Y"));
                                $show_count =10;

                                $query sprintf("    SELECT * FROM ".TABLE_PREFIX."event
                                                    WHERE visible = 1
                                                    AND (dateline_from >= '
                                $mydate' || (dateline_from >= '$mydate' AND dateline_to <= '$mydate' ) || ('$mydate' BETWEEN dateline_from AND dateline_to))
                                                    ORDER BY dateline_from ASC LIMIT 
                                $show_count");

                                $event_get vB::$db->query_read($query);

                                $output_bits '';
                                while(
                                $event vB::$db->fetch_array($event_get)) {

                                     if(
                                $event['dateline_to'] == )
                                     {
                                         
                                $format sprintf("On %s",vbdate('D M jS Y',$event['dateline_from'],false,true,false,true));
                                     } else {
                                         
                                $format sprintf("From %s to %s",vbdate('D M jS Y',$event['dateline_from'],false,true,false,true),vbdate('jS M Y',$event['dateline_to'],false,true,false,true));
                                     }

                                     
                                $output_bits .= sprintf('
                                        <div class = "cms_widget_post_bit"><h4 class="cms_widget_post_header"><a href="calendar.php?do=getinfo&e=%d">%s</a></h4>
                                            <p class="cms_widget_post_content">%s</p>
                                         </div>
                                        '
                                ,$event['eventid'],$event['title'],$format);

                                }
                                $output $output_bits;

                                ob_end_clean();​ 

                                Comment

                                Users Viewing This Page

                                Collapse

                                There is 1 user viewing this forum topic.

                                • Guest Guest

                                Latest Posts

                                Collapse

                                Working...
                                X
                                Searching...Please wait.
                                An unexpected error was returned: 'Your submission could not be processed because you have logged in since the previous page was loaded.

                                Please push the back button and reload the previous window.'
                                An unexpected error was returned: 'Your submission could not be processed because the token has expired.

                                Please push the back button and reload the previous window.'
                                An internal error has occurred and the module cannot be displayed.
                                There are no results that meet this criteria.
                                Search Result for "|||"