vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   vBaCMPS Featured/Random Geek Articles (https://vborg.vbsupport.ru/showthread.php?t=73836)

The Geek 01-04-2005 10:00 PM

vBaCMPS Featured/Random Geek Articles
 
Hack: vBadvanced CMPS Featured/Random Geek Articles
Version: 1.2
Author: Me

Instructions:
upload modules/featuredgeekarticles.php into modules folder
upload admincp/featuredgeekarticles_install.php into admincp folder
run above fileFollow the file modification in the README

File modifications: 1
Template modifications: 0
Installer: Yup. A very cool one.
Phrased: Yup

In a nutshell, this module is based upon the vBa news module, but is instead set up to pull a pre specified 'Featured Article' or even a 'Random Article'. This is really designed for those using The Geek Article System. If you don't have The Geek Article System, you are most likely very lonely anyway.

version 1.2 uploaded 02/02/05
Updated Readme to work with latest vBaCMPS

version 1.2 uploaded 07/01/05
Fixed 'Excluded Forums' bug that appeared to have been bitten by Zombie.
It came back to haunt one user so I had to take drastic action and update it.
It now WORKS with your 'excluded forums' setting. That is to say, you can exclude your acticle forums from 'Latest topics' but they will still happily appear as a featured article.
Please note that this means there is now a file edit. Please read the README.

Check out the Readme that comes in the package.

note:if you dig this module, you may be interested in the Latest articles one too.

PS: Your template will be a tad different from my screen shot as this is for my style.

nJoy

fly 01-05-2005 07:30 PM

Thanks man! Just what I needed.

fly 01-05-2005 09:26 PM

Hmmm
Do I have to have the geek article system installed for this to work?

edit: apparently so, cause nothing is showing up!

The Geek 01-05-2005 09:39 PM

Quote:

Originally Posted by flypaper
Hmmm
Do I have to have the geek article system installed for this to work?

edit: apparently so, cause nothing is showing up!

Actually, no.

You will need to have vBadvanced installed as a minimum though (as it uses its settings system).

Just out of curiosity... what are you after if you don't have my article thingee installed?

fly 01-05-2005 09:47 PM

I have contests on my board and i want to have those as the 'featured thread' on my site. And I do have vBadvanced installed...

And you're right, I dont have Geek Articles installed and Im very lonely. Will you be my friend?

edit: Oh yeah, and Im really dumb. I got it working. thx

The Geek 01-05-2005 09:53 PM

Quote:

Originally Posted by flypaper
have those as the 'featured thread' on my site. And I do have vBadvanced installed...

And you're right, I dont have Geek Articles in

Damn straight. You sure you did the settings correctly? You dont need Geek Articles to pull off the featured thread.
1- Make sure that you have added the featuredgeekarticles module through vBaCMPS.
2- Make sure your 'Featured/Random thread' is set to yes and the next box has the threadid of the featured thread.

like this:

TCB 01-05-2005 10:03 PM

I've never seen an easier to install mod for vbadvanced than yours (never had one with an installscript before). And the text that you mention to come up with with every installer is hilarious every time https://vborg.vbsupport.ru/external/2005/01/7.gif.

I'll install this mod first thing tomorrowmorning. Thanks!

bold 01-06-2005 02:34 AM

nothing shows up for me too

rlamego 01-06-2005 02:42 AM

Random doesn't work on my site. I've tried every combination of yes/no - forumids/threadids but it doesn't display anything.

Ooops! Almost forgot! Thanks for another great hack! =)

The Geek 01-06-2005 06:10 AM

Hey guys... those of you having problems... can you post the first 2 settings of your...um, settings (i.e. Featured or Random Article? and Featured thread id) and I will get it sorted for you ;)

tormodg 01-07-2005 08:42 PM

Quote:

Originally Posted by the nail geek
Hey guys... those of you having problems... can you post the first 2 settings of your...um, settings (i.e. Featured or Random Article? and Featured thread id) and I will get it sorted for you ;)

I use the geek article system. Ie, lots of gas, lots of friends!

Love it, geek.

hockyfan 01-16-2005 03:32 PM

For some reason, it seems to only be pulling certain articles over and over, while I listed about 4 forums with many articles each, I keep seeing the same ones being "randomly" featured. Is it possible I did something wrong? I have it set to random, and I have a list of the forums like this "1,2,3" - should there be spaces in the commas? Is there a setting I've overlooked?

Is there some kind of restriction on which articles it pulls? I know for certain I have many more articles than it has shown, even though I've refreshed my page many times and checked on multiple days, yet have only seen at most 5 different articles.


h

The Geek 01-16-2005 07:29 PM

Quote:

Originally Posted by hockyfan
For some reason, it seems to only be pulling certain articles over and over, while I listed about 4 forums with many articles each, I keep seeing the same ones being "randomly" featured. Is it possible I did something wrong? I have it set to random, and I have a list of the forums like this "1,2,3" - should there be spaces in the commas? Is there a setting I've overlooked?

Is there some kind of restriction on which articles it pulls? I know for certain I have many more articles than it has shown, even though I've refreshed my page many times and checked on multiple days, yet have only seen at most 5 different articles.


h

Have you made any adjustments? The reason I ask is because the title box says 'Featured Article' instead of 'Random Article'. That tells me that Featured or Random Article is set to yes.
Let me know if that is the case. otherwise Ill need the SQL statement.

hockyfan 01-16-2005 07:35 PM

Not sure what you mean by the "SQL Statement," but the only adjustment I made was I changed the phrase "Random Article" to say "Featured Lesson," just based on my personal preferance on wording, no other changes were made and I am, indeed, using the "Random Article" option.

h

The Geek 01-16-2005 07:51 PM

Yea, after I posted my response I started refreshing. out of about 12 refreshes, I came up with 2 or 3 duplicates... but I guess that depends on the amount of articles you have.
'standard notation according to tab' or whatever was the one that seemed to want to appear more than others, however I was still getting pretty random results (just went back on and the one I just mentioned popped up a couple times... but still not overly disportionate). Do you still feel like its not 'random' enough?

hockyfan 01-16-2005 08:03 PM

I feel like some of the forums' articles aren't being pulled, while other forums are constantly being pulled; not sure why.

h

memobug 01-16-2005 10:45 PM

It might be perception, might be based on the proportion of articles in each forum. Try omitting the "constant" forums and seeing if you actually get output from the "never" forums.

Regards,

Matt

hockyfan 01-17-2005 06:25 PM

Is there any way to make it so it doesn't rely on how many articles there are per forum?

h

The Geek 01-17-2005 08:44 PM

Quote:

Originally Posted by hockyfan
Is there any way to make it so it doesn't rely on how many articles there are per forum?


h

Hey H.

I am not sure what you are asking here. What mySQL does is select a random listing from one of the forums in your coma seperated field. It doesnt weigh the pull or anything. The randomness is occuring at mySQL level, not in the code.

Sorry if that doesnt help.

hockyfan 01-17-2005 08:57 PM

No, that's what I had thought, memobug's post led me to believe otherwise, but no worries. :)

So is there any reason though I keep getting one thread many times, while other ones I have yet to see at all?


h

The Geek 01-18-2005 06:00 AM

Quote:

Originally Posted by hockyfan
No, that's what I had thought, memobug's post led me to believe otherwise, but no worries. :)

So is there any reason though I keep getting one thread many times, while other ones I have yet to see at all?


h

I think that it is one of those random things. Unless there is some nuance with mySQL's rand() function that I am not aware of, then its simply down to the luck of the draw and maybe one of your articles are simply getting a bit more lucky than others. I have refreshed your home page several times and occasionally I will get one I have already seen, but that is typical of something being random.
The other choice is to keep a cache of the 'last shown feature' and then incriment to the next. In other words, instead of random you would get a cycled. The random factor then would be the person loading the page. They could still see the same ad - it just depends on how many people viewed since they were last on.
It would also require an extra select and an extra update (essentially 2 more queries to do) - hmmmm - I wonder though... I wonder if I could do something with a cookie that may mix it up a little.

Ill have to give it some thought. If anyone has any ideas - feel free :)

hpwilhelm 02-02-2005 04:46 PM

Do this work with CMPS v1.0.1?

I cant find where to add the second code in the include_bottom.php. And it doesn't seem to work without it. :)

The Geek 02-02-2005 06:03 PM

Quote:

Originally Posted by hpwilhelm
Do this work with CMPS v1.0.1?

I cant find where to add the second code in the include_bottom.php. And it doesn't seem to work without it. :)

Huh... just noticed the new release. Ill look into it.

The Geek 02-02-2005 06:52 PM

Quote:

Originally Posted by the nail geek
Huh... just noticed the new release. Ill look into it.

Right - here is the minor fix:

Dont follow Step 2

Ill update the package - Thanks

hpwilhelm 02-12-2005 07:27 PM

Quote:

Originally Posted by the nail geek
Right - here is the minor fix:

Dont follow Step 2

Ill update the package - Thanks

Thanks for the update! :)

One more question: How do I get it to enable HTML?

The Geek 02-12-2005 07:47 PM

Quote:

Originally Posted by hpwilhelm
Thanks for the update! :)

One more question: How do I get it to enable HTML?

hmmm. That should be dependant on the post it pulls. Is there HMTL enabled in the post itself?

Aside from the dangers of posting HTML, it could also mess up your page as the HTML could get snipped before close tags.

Let me know.

hpwilhelm 02-12-2005 08:28 PM

Yes, the post is in a HTML enabled forum :)

I'm aware of the dangers of HTML, so the articles in this forum may only be posted by admins, and all comments will be moderated ;)

The Geek 02-12-2005 08:49 PM

Quote:

Originally Posted by hpwilhelm
Yes, the post is in a HTML enabled forum :)

I'm aware of the dangers of HTML, so the articles in this forum may only be posted by admins, and all comments will be moderated ;)

hmmm.

If only admins can post. try this:

replace (in your modules/featuredgeekarticles.php)
PHP Code:

$geek_feature['message'] = parse_bbcode2($geek_feature['pagetext'], 01$allowsmilie1); 

with
PHP Code:

$geek_feature['message'] = parse_bbcode2($geek_feature['pagetext'], 11$allowsmilie1); 

I havent tested... but it should work.

hpwilhelm 02-13-2005 02:38 PM

Thanks! It worked perfectly! :D

The Geek 02-13-2005 02:50 PM

Quote:

Originally Posted by hpwilhelm
Thanks! It worked perfectly! :D

Cool. Glad to have helped. Hit install when you get a minute please ;)

hpwilhelm 02-13-2005 04:21 PM

Quote:

Originally Posted by the nail geek
Cool. Glad to have helped. Hit install when you get a minute please ;)

Done! :D

KTBleeding 02-14-2005 04:17 PM

Is there any way to show the first attachment in the thread on the "featured" module? That would be killer. I'm having a look at the code trying to see if I can figure it out, but I don't know how to pull the attachment from the database. :x

venomx 02-26-2005 06:50 AM

What are the templates we use for this? THey are not listed in the install files. :(

Also should this be a center, right, or left col?

The Geek 02-26-2005 07:49 AM

Quote:

Originally Posted by venomx
What are the templates we use for this? THey are not listed in the install files. :(

Also should this be a center, right, or left col?

The template is installed with the install file. Its really designed for middle but you should be able to use with any :)


hth's

venomx 02-28-2005 04:02 AM

Yes they are installed but when we make the module we need the names of the templates.. otherwise they are uncached and add load to the pages...

The Geek 03-02-2005 11:01 PM

Quote:

Originally Posted by venomx
Yes they are installed but when we make the module we need the names of the templates.. otherwise they are uncached and add load to the pages...

duh! Thanks for that! Its: adv_portal_geekfeaturedarticle

HTH's

T3MEDIA 03-10-2005 10:58 AM

Well let me be the first to ask the question....
Is there any way to do this with vbindex?

Yeah.... I know. But its too late.
So since this has a installer I cant even fiddle with it.

Help?

The Geek 03-11-2005 02:31 PM

Quote:

Originally Posted by T3MEDIA
Well let me be the first to ask the question....
Is there any way to do this with vbindex?

Yeah.... I know. But its too late.
So since this has a installer I cant even fiddle with it.

Help?

I used to use vbindex before vbadvanced - but I couldnt really help you there (though it really wouldnt be too hard as the mod file has most everything you need in it).

Ill try to keep this in mind for the next version :)

ikastara 03-14-2005 08:06 AM

yo.. thanks for your works
but i dunno why i can not get eandom articles to work. it showed fine for featured articles, but nothing shows when i choose random

for setting, i choose no for the first option (obviously.. )
then enter : 5,6,7 (forum id for the articles)

nothing show up :'(

The Geek 03-14-2005 08:19 AM

Quote:

Originally Posted by ikastara
yo.. thanks for your works
but i dunno why i can not get eandom articles to work. it showed fine for featured articles, but nothing shows when i choose random

for setting, i choose no for the first option (obviously.. )
then enter : 5,6,7 (forum id for the articles)

nothing show up :'(

huh. I only use the random option. Does a blank module box appear or nothing at all?
Can you send me screenies and ill scan it for you.

Thanks (BTW: none of those forumids are in the vba Excluded Forums section?)

Cheers


All times are GMT. The time now is 02:45 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.01427 seconds
  • Memory Usage 1,839KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (17)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete