vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced CMPS > vBa CMPS v3.0 Support > "How Do I..." Questions

Reply
 
Thread Tools Display Modes
  #1  
Old 05-28-2007, 12:12 PM
succo succo is offline
Member
 
Join Date: Nov 2005
Posts: 85
Default invisible location

ok, here is what i want to do:

show the archived news without having to show the actual news

could anyone confirm that, if i put the news module inside an 'invisible' location (one i'd put within a <div style="visibility:hidden"></div> inside the adv_portal template) the archived news would work just fine?

i'm asking because, as i already posted, the news strangely even if enabled don't parse at all, and i'm asking myself why

btw, would the invisible location with the 'invisible' news need to be BEFORE the actual news archive module location for it to work? or can that be everywhere in the page?

thanks
Reply With Quote
  #2  
Old 05-29-2007, 10:28 AM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: invisible location

Why go through all of that? You could just as easily make a copy of the recent threads module, change some settings, and then you have the same thing.
Reply With Quote
  #3  
Old 05-29-2007, 01:31 PM
succo succo is offline
Member
 
Join Date: Nov 2005
Posts: 85
Default Re: invisible location

let me try, will let you know
thanks
Reply With Quote
  #4  
Old 05-29-2007, 02:26 PM
succo succo is offline
Member
 
Join Date: Nov 2005
Posts: 85
Default Re: invisible location

let me explain what i'd like to do...
i'm going to use gars as a module for showing the news, so i won't use the 'standard' news anymore... that's why i'd like the archived news to show the thread titles coming AFTER the ones listed by gars...

i thought that, in your way of doing, i could say that the 'new' archive would be based on the recentthreads, tell him to fetch not only the latest $mod_options['portal_threads_maxthreads'] threads, but $mod_options['portal_threads_maxthreads'] + my gars variable, telling the module that its parent was the gars news module, but this way the variable i put in the gars module isn't passed to the new module... i'd have to put the number manually, and of course this is not what i'd like to do

btw, as i'm quite new to php (not that much, but i am), in recentthreads how could i put a while to say to ignore the first 'mynumber' threads and display only the other ones?

thanks
Reply With Quote
  #5  
Old 05-29-2007, 02:38 PM
convergent convergent is offline
Senior Member
 
Join Date: Jan 2006
Location: NY
Posts: 150
Default Re: invisible location

If you want to use the GARS stuff, then your best bet is to use the GARS CMPS add-on and modify it to what you need. Here is a sample page that is using three different modified versions of that guy to give you an idea of how hacked up it can be... the last block is the standard CMPS recent threads block.

http://pdaphonehome.com/?page=treo755p
Reply With Quote
  #6  
Old 05-29-2007, 04:42 PM
succo succo is offline
Member
 
Join Date: Nov 2005
Posts: 85
Default Re: invisible location

yes, that's right what i'm going to do, but i'd like to have both the recent threads (which i can have with no problem at all) and the archived news, using the threads from my news forum just after the ones shown by the gars module, and this is impossible using the news archive module, as it needs the news module to be on the same page...

that's why i was thinking of having the gars module visible, the news module present but invisible (in the hidden div) and the archived news visible again

it would be much easier to do it the way brian says, but i have no clue on how to make the recentthreads 'jump' the threads used by gars and read the next ones

btw, really nice (and clean) style you used for the gars template in your homepage... would you mind if i use it as a base for my own template?

Last edited by succo; 05-29-2007 at 04:44 PM.
Reply With Quote
  #7  
Old 05-30-2007, 11:03 AM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: invisible location

Quote:
Originally Posted by succo View Post
it would be much easier to do it the way brian says, but i have no clue on how to make the recentthreads 'jump' the threads used by gars and read the next ones
You would just need to change the LIMIT statment in the recentthreads.php file to something like this:

Code:
LIMIT 5, $mod_options[portal_threads_maxthreads]
Change 5 to the number of news posts you're displaying, and you may want to add a conditional around it so that it would only be added when viewing that particular module.
Reply With Quote
  #8  
Old 05-30-2007, 02:40 PM
succo succo is offline
Member
 
Join Date: Nov 2005
Posts: 85
Default Re: invisible location

ehm... i must confess my ignorance in mysql syntax...

thank you very much for your help, it was precious... but, is there any way to make the (modified) recentthreads read the value i put for gars limit so that if i change it in gars module it will 'jump' the correct number of threads automatically?

thanks again
Reply With Quote
  #9  
Old 05-30-2007, 05:14 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: invisible location

You should be able to use a variable that looks something like this to determine the value of that setting:

$cmps_options['adv_portal_{gars_identifier}']['varname']

Also, I wasn't thinking about the hook location, but you should be able to just add a hook to the 'vba_cmps_module_recthreads_start' location that changes the $mod_options[portal_threads_maxthreads] variable to the new syntax so you don't have to make any changes to the file.
Reply With Quote
  #10  
Old 05-30-2007, 05:40 PM
succo succo is offline
Member
 
Join Date: Nov 2005
Posts: 85
Default Re: invisible location

ok, it works just nicely, now

anyway, i still haven't tried to use template hooks (i saw vB added a lot of them to the new version)

i'd have a problem with the plugin, anyway, as i'd like to use the 'modded' recentthreads side by side with the 'normal' recentthreads, so i couldn't use something as 'if page is mypagename change "$mod_options[portal_threads_maxthreads]" to "$cmps_options['adv_portal_{gars_identifier}']['varname'], $mod_options[portal_threads_maxthreads]"'
or is there any way to tell the plugin something like 'if the actual module is recentthreads act normally, else if it's the gars archive change the variable'?

again, thank you a lot for the help
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hook Location Itworx4me "How Do I..." Questions 1 05-13-2007 11:20 AM
invisible but not on home page??? ~Xcalibur~ Troubleshooting & Problems 2 09-27-2005 10:18 PM
Invisible Active Users Count DGTLMIK Troubleshooting / "How do I..." Questions 5 06-23-2005 11:45 AM
vba location in Admincp Samir Troubleshooting / "How do I..." Questions 3 09-30-2004 11:26 AM
Quick question about invisible directories fuse3k Pre-Sale Questions 3 09-28-2004 05:00 PM


All times are GMT -4. The time now is 07:33 AM.

Forums Powered by vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Please note that vBadvanced is in no way affiliated with Jelsoft Enterprises Ltd, nor will Jelsoft be able to provide any support for our products.