Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #61  
Old 01-10-2005, 01:07 PM
cinq's Avatar
cinq cinq is offline
 
Join Date: Oct 2002
Posts: 1,398
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just an update, optimized several queries with some help here

Working on a report comment, edit comment, delete comment feature now.
Once done, will download FCK and give it a go.

I think I will then wrap things up with an installation script ( 40+ templates, many settings and phrases to create, plus 4 db tables creation ) , if FCK goes smoothly .... unlike spaw ...
Reply With Quote
  #62  
Old 01-10-2005, 01:25 PM
Torqued Torqued is offline
 
Join Date: Oct 2004
Location: Houston, TX
Posts: 180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

woo hoo! can't wait to see this hack!
Reply With Quote
  #63  
Old 01-10-2005, 03:43 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by cinq
Problem 2 solved ! ( thanks Rake ! )

Code used :
PHP Code:
 # previous and next article links
    
if($nextone $DB_site->query_first("SELECT articles_articleid FROM " TABLE_PREFIX "articles_article WHERE articles_articleid > $artid AND categoryid = $categoryid ORDER BY articles_articleid ASC LIMIT 1"))
    {
        
$nextone $nextone['articles_articleid'];
        
$nextarticle 1;
    }

    if(
$previousone $DB_site->query_first("SELECT articles_articleid FROM " TABLE_PREFIX "articles_article WHERE articles_articleid < $artid AND categoryid = $categoryid ORDER BY articles_articleid DESC LIMIT 1"))
    {
        
$previousone $previousone['articles_articleid'];
        
$prearticle 1;
    } 
Decided to put in
PHP Code:
AND categoryid $categoryid 
to limit to previous or next articles in the same category.
you can do that in one query.
Reply With Quote
  #64  
Old 01-10-2005, 03:48 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by nexialys
1- pagination is a 3 lines code... already have something inside vB for that.
wow, it is, i haven't ever rewritten the code i was giving along time ago for sorting pagenav but the code i have is 30 lines long :shock:

please share the knowledge
Reply With Quote
  #65  
Old 01-11-2005, 12:08 AM
cinq's Avatar
cinq cinq is offline
 
Join Date: Oct 2002
Posts: 1,398
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sabret00the
you can do that in one query.
Would be nice if you could share how to ?
Reply With Quote
  #66  
Old 01-11-2005, 07:09 AM
cinq's Avatar
cinq cinq is offline
 
Join Date: Oct 2002
Posts: 1,398
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

report comment, edit and delete comment done.
FCK's basic WSYIWYG integration works too, now working on the image upload handling in FCK.
Reply With Quote
  #67  
Old 01-11-2005, 08:01 AM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

something like this

PHP Code:
    if ($nextone)
    { 
// set the variables
            
$nextone $nextone['articles_articleid'];
            
$nextarticle 1;
        
$articlenav_direction ">";
        
$articlenav_order "ORDER BY articles_articleid ASC";
    }
    else if (
$previousone)
    {
        
$previousone $previousone['articles_articleid'];
        
$prearticle 1;
        
$articlenav_direction "<";
        
$articlenav_order "ORDER BY articles_articleid DECS";
    }

    
$articlenav $DB_site->query_first("SELECT articles_articleid FROM " TABLE_PREFIX "articles_article WHERE articles_articleid $articlenav_direction $artid AND categoryid = $categoryid $articlenav_order LIMIT 1"); 
far from impressive really, both acheive the same thing as well, theris really no reason to switch since it don't perform the query unless asked to.
Reply With Quote
  #68  
Old 01-11-2005, 08:10 AM
cinq's Avatar
cinq cinq is offline
 
Join Date: Oct 2002
Posts: 1,398
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't think your code does what I need it to do.
I need to query 2 times first to know if there are next or previous articles available.

In your code, if($nextone) or if($previousone) has no value initially...
Reply With Quote
  #69  
Old 01-11-2005, 09:43 AM
cinq's Avatar
cinq cinq is offline
 
Join Date: Oct 2002
Posts: 1,398
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm FCK's default resource browser is really confusing. I have stripped away code to simplify it but not exactly giving the full functionality I would hope for.

ie. when adding an article, a folder for that article for its images is automagically created and when browsing should be only able to see this created folder.
However it now sees all folders. There is no way to pass the folder path to FCK to tell it to dynamically only show that particular folder.

It just means that you will have to manually search for the folder ( i will provide an folder number for you to search for ), click on it, to show all the images, or upload images there as well.

If this sounds about good, I consider this hack done and I will move on to the installation script. Please let me know.
Reply With Quote
  #70  
Old 01-11-2005, 11:28 AM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by cinq
I don't think your code does what I need it to do.
I need to query 2 times first to know if there are next or previous articles available.

In your code, if($nextone) or if($previousone) has no value initially...
the determination of the preview or next article before hand is impossible via my way you're right i apologise, however the $next and $preview comes from the url

i.e.
HTML Code:
<a href="http://localhost/forums/article.php?a=104845&nextone">next one</a>
the code would work but not for what you need it for without getting creative in the most awesome ways imaginable :lol: joking.
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 06:22 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04187 seconds
  • Memory Usage 2,291KB
  • Queries Executed 14 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_html
  • (3)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (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_postinfo_query
  • fetch_postinfo
  • 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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete