Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Widget: last articles blogs in CMS - by omardealo Details »»
Widget: last articles blogs in CMS - by omardealo
Version: 1.0, by omardealo omardealo is offline
Developer Last Online: Sep 2022 Show Printable Version Email this Page

Category: vBulletin CMS Widgets - Version: 4.0.2 Rating:
Released: 03-29-2010 Last Update: Never Installs: 8
 
No support by the author.

Peace and mercy of God be upon you

Widget: last articles blogs in CMS - by omardealo tested on 4.0.2
God willing, also was working on 4.0.1

Programming:
omardealo
7-secret.org

Image:


Example:
arabic : http://www.7-secret.org
english : http://www.7-secret.org/content.php?language=en


Code1: Source code for the latest blogs related to a specific username

PHP Code:
ob_start();  
  
$blog_get vB::$db->query_read("
SELECT * from " 
TABLE_PREFIX " blog where username='omardealo' order by dateline DESC LIMIT 20");
  
$output_bits '';
  while(
$blog vB::$db->fetch_array($blog_get))
  {
        
$output_bits .= '<font color="#ff0000"><b>?</b></font><a href="blog.php?b='.$blog[blogid].'">'.$blog[title].'</a></br />
                       <a href="member.php?u='
.$blog[userid].'"><b>'.$blog[username].'</b><br />';
  }
  
$output $output_bits;
  
ob_end_clean(); 
- with the replacement of the number of articles blogs that you want to appear
PHP Code:
LIMIT 20 
- With the replacement of the name of the selected username
PHP Code:
omardealo 

Code2: Source code for the latest articles blogs for all user

PHP Code:
ob_start();  
  
$blog_get vB::$db->query_read("
SELECT * from " 
TABLE_PREFIX " blog order by dateline DESC LIMIT 20");
  
$output_bits '';
  while(
$blog vB::$db->fetch_array($blog_get))
  {
        
$output_bits .= '<font color="#ff0000"><b>?</b></font><a href="blog.php?b='.$blog[blogid].'">'.$blog[title].'</a></br />
                       <a href="member.php?u='
.$blog[userid].'"><b>'.$blog[username].'</b><br />';
  }
  
$output $output_bits;
  
ob_end_clean(); 
- with the replacement of the number of articles blogs that you want to appear
PHP Code:
LIMIT 20 


Composition:

Goto Admincp->vBullietin CMS->Widgets->Create New Widget
Choose PHP Direct Execution as Widget's Type
Place a Title. last articles blogs
Click Save
Click Configure on the right of the new created widget.
Remove the default code that appears. Be sure to not leave behind even a single letter.
Copy and Paste the code that you can find below.
Leave the template name as is (vbcms_widget_execphp_page)
Click Save
Goto Admincp->vBullietin CMS->Layout Manager
Click Go on the Default Layout
Add the Widget to your Layout
Click Save


Source:
http://www.7-secret.org/showthread.php?t=326

hack in arabic - الهاك باللغة العربية:
http://www.7-secret.org/showthread.php?t=325


May God help you do not forget to pray for me and my parents back of the unseen

Download Now

File Type: (59.6 KB, 0 views)
File Type: (91.0 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 03-30-2010, 04:46 AM
kho91 kho91 is offline
 
Join Date: Dec 2007
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i have a sql error tatabase nam don't exist

chokrane akhi
Reply With Quote
  #3  
Old 03-30-2010, 06:00 AM
omardealo's Avatar
omardealo omardealo is offline
 
Join Date: Nov 2008
Location: egypt
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kho91 View Post
i have a sql error tatabase nam don't exist

chokrane akhi
u use code1 or code2
code1 u must replace omardealo to username in ur forum
Reply With Quote
  #4  
Old 03-30-2010, 06:03 AM
kho91 kho91 is offline
 
Join Date: Dec 2007
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

code 2
Reply With Quote
  #5  
Old 03-30-2010, 04:57 PM
karlm's Avatar
karlm karlm is offline
 
Join Date: Jul 2006
Location: England
Posts: 447
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
SELECT from vb blog order by dateline DESC LIMIT 20;

MySQL Error   Table 'xxxx.vb' doesn't exist
Error Number  : 1146
Request Date  : Tuesday, March 30th 2010 @ 06:55:21 PM
Error Date    : Tuesday, March 30th 2010 @ 06:55:22 PM
Script        : http://antimisandry.com/content.php
Referrer      : http://antimisandry.com/members/marx/
IP Address    : xx.xx.xx.xx
Username      : Marx
Classname     : vB_Database
MySQL Version : 5.0.90 
XXXX = My databasename, but I don't see where the .vb got added?
IOW, it's asking for a table called "mydatabasename.vb" which doesn't exist - the only reference to 'mydatabasename' is the database itself, not one of the tables within the database.
Reply With Quote
  #6  
Old 03-30-2010, 05:15 PM
kho91 kho91 is offline
 
Join Date: Dec 2007
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i have the same problem
Reply With Quote
  #7  
Old 03-31-2010, 03:45 AM
omardealo's Avatar
omardealo omardealo is offline
 
Join Date: Nov 2008
Location: egypt
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by karlm View Post

XXXX = My databasename, but I don't see where the .vb got added?
IOW, it's asking for a table called "mydatabasename.vb" which doesn't exist - the only reference to 'mydatabasename' is the database itself, not one of the tables within the database.
Quote:
Originally Posted by kho91 View Post
i have the same problem
code 2 working good in my cms
try this

PHP Code:
ob_start();  
  
$blog_get vB::$db->query_read("
SELECT * from blog order by dateline DESC LIMIT 20"
);
  
$output_bits '';
  while(
$blog vB::$db->fetch_array($blog_get))
  {
        
$output_bits .= '<font color="#ff0000"><b>?</b></font><a href="blog.php?b='.$blog[blogid].'">'.$blog[title].'</a></br />
                       <a href="member.php?u='
.$blog[userid].'"><b>'.$blog[username].'</b><br />';
  }
  
$output $output_bits;
  
ob_end_clean(); 
Reply With Quote
  #8  
Old 03-31-2010, 01:20 PM
karlm's Avatar
karlm karlm is offline
 
Join Date: Jul 2006
Location: England
Posts: 447
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by omardealo View Post
code 2 working good in my cms
try this

PHP Code:
ob_start();  
  
$blog_get vB::$db->query_read("
SELECT * from blog order by dateline DESC LIMIT 20"
);
  
$output_bits '';
  while(
$blog vB::$db->fetch_array($blog_get))
  {
        
$output_bits .= '<font color="#ff0000"><b>?</b></font><a href="blog.php?b='.$blog[blogid].'">'.$blog[title].'</a></br />
                       <a href="member.php?u='
.$blog[userid].'"><b>'.$blog[username].'</b><br />';
  }
  
$output $output_bits;
  
ob_end_clean(); 
This code still causes a d/b error.

PHP Code:
Database error in vBulletin 4.0.2:

Invalid SQL:

SELECT from blog order by dateline DESC LIMIT 20;

MySQL Error   Table 'my_database_name.blog' doesn't exist
Error Number  : 1146
Request Date  : Wednesday, March 31st 2010 @ 03:18:47 PM
Error Date    : Wednesday, March 31st 2010 @ 03:18:50 PM
Script        : http://antimisandry.com/content/
Referrer      : http://antimisandry.com/australian-mens-news/dysfunctional-feminism-strikes-again-29377.html
IP Address    : xxxxxxxxxx
Username      : xxxxxxxx
Classname     : vB_Database
MySQL Version : 
For some reason, and I'm no coder so can't say why, it is still trying to look up a table called my_database_name instead of an existing table within the database. It makes no sense.
Whereas previously (using code2) it would ask for a table called "my_database_name.vb" it now asks for a table, which also does not exist, called "my_database_name.blog"
Reply With Quote
  #9  
Old 03-31-2010, 09:04 PM
omardealo's Avatar
omardealo omardealo is offline
 
Join Date: Nov 2008
Location: egypt
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by karlm View Post
This code still causes a d/b error.
For some reason, and I'm no coder so can't say why, it is still trying to look up a table called my_database_name instead of an existing table within the database. It makes no sense.
Whereas previously (using code2) it would ask for a table called "my_database_name.vb" it now asks for a table, which also does not exist, called "my_database_name.blog"
sir , my code Queries from table blog
PHP Code:
SELECT from blog order by dateline DESC LIMIT 20
not from table my_database_name.blog
so I do not know from where comes the name of the table "my_database_name.blog"
if u use tableprefix in config.php this code will work with u well
PHP Code:
ob_start();  
  
$blog_get vB::$db->query_read("
SELECT * from " 
TABLE_PREFIX " blog order by dateline DESC LIMIT 20");
  
$output_bits '';
  while(
$blog vB::$db->fetch_array($blog_get))
  {
        
$output_bits .= '<font color="#ff0000"><b>?</b></font><a href="blog.php?b='.$blog[blogid].'">'.$blog[title].'</a></br />
                       <a href="member.php?u='
.$blog[userid].'"><b>'.$blog[username].'</b><br />';
  }
  
$output $output_bits;
  
ob_end_clean(); 
Reply With Quote
  #10  
Old 04-01-2010, 01:02 AM
karlm's Avatar
karlm karlm is offline
 
Join Date: Jul 2006
Location: England
Posts: 447
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well I do appreciate your efforts, but even a direct copy & paste still kills my d/b, resulting in errors when using this widget.

PHP Code:
Database error in vBulletin 4.0.2:

Invalid SQL:

SELECT from vb blog order by dateline DESC LIMIT 20;

MySQL Error   Table 'XXXX.vb' doesn't exist
Error Number  : 1146
Request Date  : Thursday, April 1st 2010 @ 02:59:33 AM
Error Date    : Thursday, April 1st 2010 @ 02:59:43 AM
Script        : http://antimisandry.com/content/
Referrer      : http://antimisandry.com/members/yan-yan/
IP Address    : **.**.**.**
Username      : ----------
Classname     : vB_Database
MySQL Version : 
I don't understand code too well, so can't really comment on why this is happening... but again, if you note the above error message (received via email moments after testing your latest code offering) - it still claims to be trying to read a table with the name of my database.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:45 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04979 seconds
  • Memory Usage 2,378KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (12)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (2)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete