Announcement
Collapse
No announcement yet.
This day in History??
Collapse
X
-
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!
Fast VPS Host for vBulletin:
A2 Hosting & IONOS
- Top
- Translate
- Bottom
Comment
-
Can you post the HTML for the Recent Posts widget?Helpful? Donate. Thanks!
Fast VPS Host for vBulletin:
A2 Hosting & IONOS
- Top
- Translate
- Bottom
Comment
-
I believe this is it..
PHP Code:<li>
<div class="block smaller">
<div class="blocksubhead">
<a 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']">
<a 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>
- Top
- Translate
- Bottom
Comment
-
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!
Fast VPS Host for vBulletin:
A2 Hosting & IONOS
- Top
- Translate
- Bottom
Comment
-
got this..
PHP Code:syntax error, unexpected '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}
- Top
- Translate
- Bottom
Comment
-
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!
Fast VPS Host for vBulletin:
A2 Hosting & IONOS
- Top
- Translate
- Bottom
Comment
-
I was referring to my post. Just copy the latest code I posted.Helpful? Donate. Thanks!
Fast VPS Host for vBulletin:
A2 Hosting & IONOS
- Top
- Translate
- Bottom
Comment
-
That is the replacement code for the code I posted in post #38Helpful? Donate. Thanks!
Fast VPS Host for vBulletin:
A2 Hosting & IONOS
- Top
- Translate
- Bottom
Comment
-
Originally posted by glennrocksvb View PostThat is the replacement code for the code I posted in post #38
Also i did use that code and replaced the whole box and I got nothing
PHP Code:ob_start();
global $db,$vbulletin;
$mydate = mktime(0, 0, 0, date("m"), date("d")-1, date("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'] == 0 )
{
$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();
- Top
- Translate
- Bottom
Comment
Users Viewing This Page
Collapse
There is 1 user viewing this forum topic.
- Guest
Latest Posts
Collapse
-
Reply to Archive videos bb codeby BlackhorseFinally I did it, here is the replacement for your review and improvement Glenn, and for any one would need it:
Code:<iframe src="https://archive.org/embed/{param}"
Today, 01:36 AM -
by BlackhorseHello Glenn,
Any help please regarding a working Archive Videos BB codes?
Edited:
I am finding difficulties in implementing...05-16-2024, 08:34 AM -
Reply to Archive videos bb codeby BlackhorseHello Glenn, twiiter and twitch are working like charm, Thank You so much i have psted in their posts.
I am lookng in this post for playing...Today, 12:01 AM
Comment