PDA

View Full Version : vba CMPS GARS block


Pages : [1] 2

The Geek
05-10-2006, 07:00 PM
This is just a quick vba Module I threw together to try and please the 'Damnit - come up with vba support' people.

This will create 3 different layouts depending on the modules settings. If you want to create more than 1 block, make a physical copy of the file and rename it. Then add the copy as a new vba module.

Im not really supporting this, just thought I would whip it out.

Be sure to read the gars.txt file that comes with the package - and also be sure to edit gars.php to adjust your settings.

** updated 4.3.07. Make sure you edit your settings and update your adv_portal_gars2 template with the one in the readme.

nJoy.

The Geek
05-10-2006, 07:01 PM
BTW: This may not work on versions earlier than 2.0 Beta 1 (havent tried it yet).

gothic
05-10-2006, 07:15 PM
You give in too easily my friend :eek: and may I also say thakyou VERY much
:D :D

gothic
05-10-2006, 07:23 PM
Just fired it up on my local dev server. Absolutly perfect, thankyou.

p.s. methinks you may have made a lot of people happy

smo
05-11-2006, 12:20 AM
yeeehaw...thats fancy dancy Geek..good work releasing that for us.

I know youre not giving support, but I get a nice white page.

nbento
05-11-2006, 02:42 AM
I can already say THANK YOU
You dont know how happy you just made me today :)

The Geek
05-11-2006, 08:28 AM
smo - did you create the templates I put in the gars.txt file? Is the entire page blank?

nbento
05-11-2006, 03:20 PM
I would love to stay happy :)
Imported, created the templates with the code in the .txt file, but unfortunatly its not showing on vba page.
http://www.webtalkingelite.com for some reason... I dont know if its the vba mess up or something, becouse not even the feauturedarticles hack I can put to work.

The Geek
05-11-2006, 04:03 PM
did you add a new php module block and is it active?

gothic
05-11-2006, 04:32 PM
did you add a new php module block and is it active?
Also make sure you update all pages, though I'm probably the only one around to keep forgetting things like that... it's an age thing you know :o :o

trana
05-11-2006, 07:08 PM
Cool! Thanks for helping us out.

Anyone have a screenshot?

tgreer
05-11-2006, 07:47 PM
Thanks for this! I've noticed some errors, mostly stylistic in the templates, but one main one in the main query. You're missing a field after the ORDER BY clause.

I would change:

ORDER BY $order LIMIT $limit";

to

ORDER BY g.threadid $order LIMIT $limit";

Also, it seems to display the message, rather than the synopsis. I'm still puzzling that one out.

The Geek
05-11-2006, 08:13 PM
Thanks. I was actually thinking about the order by clause today as I realized I hadnt put in the sort method (i.e. by date instead of random). It should be dateline

As far as screenshots, see the www.thevbgeek.com (http://www.thevbgeek.com) or www.thenailgeek.com (http://www.thenailgeek.com)

Lygren
05-11-2006, 08:29 PM
Thanks for this effort, mr. Geek, but where to I creative the mentioned templates?

tgreer
05-11-2006, 08:33 PM
You're welcome... err, posting in this thread is ok, vs. the Bug Tracker? Since it isn't officially supported, I figured posting here was the way to go.

I worked out the synopsis vs. pagetext issue... I saw it was a conditional in the query based on "preview". For me, I will always want the synopsis, period, so I simply edited the query to take out that conditional.

I also want a very clean look on my site, no extra graphics everywhere, so I deleted the entire first "td" element in template 2.

gothic
05-11-2006, 08:38 PM
One small discrepency that I personally don't find annoying (I use FF) can be seen in the attached images.
The one with the messed up display is IE.
Any suggestions please?
SORTED! Thankyou tgreer.

Lygren
05-11-2006, 09:14 PM
Well, I understood the template adding, but when I try to look at the latest threads from my vBa frontpage, I get:

Warning: Cannot modify header information - headers already sent by (output started at /var/www/htdocs/avforum.com/forum/modules/gars.php:113) in /includes/functions.php on line 2346

Warning: Cannot modify header information - headers already sent by (output started at /var/www/htdocs/avforum.com/forum/modules/gars.php:113) in /includes/functions.php on line 2349

??

Lygren
05-11-2006, 09:21 PM
...I haven't installed the 2.0 edition of GARS, perhaps that will solve this issue?

nbento
05-11-2006, 09:31 PM
did you add a new php module block and is it active?
Not that I totaly forgot to edit the gars.php file :) was 5Am when I sated it up :)

tgreer
05-11-2006, 09:33 PM
One small discrepency that I personally don't find annoying (I use FF) can be seen in the attached images.
The one with the messed up display is IE.
Any suggestions please?

I even got some of that in FireFox, which is why I simply deleted the TD containing the linked image. I didn't want it anyway; I only mention this because it appears there is a problem with the structure of that template.

gothic
05-12-2006, 08:26 AM
tgreer, thanks for the input. I ended up reducing the spanned columns to two which corrected the display problem I had within IE.

Lygren
05-12-2006, 08:02 PM
I ended up un-installing the Beta 2.0, it simply didn't work.

I am therefore using the 1.01 version.

Now the display is excellent on the frontpage, but I currently have an issue, though;

Unable to add cookies, header already sent.
File: /var/www/htdocs/avforum.com/forum/modules/gars.php
Line: 113

Is appearing each time I open a forum with GARS activated.

Any ideas?

Lygren
05-12-2006, 08:18 PM
OK, when choosing "YES" to cleaning file output the above error is gone, but no articles are appearing on the front-page...

In addition, I get an error when choosing any other order than random...

Anyone?

Lygren
05-12-2006, 08:48 PM
The problem seems to be that this module is not restricted to only the vBa front-page, but also the forum... In addition to the error message: Unable to add cookies, header already sent.
File: /var/www/htdocs/avforum.com/forum/modules/gars.php
Line: 113

...the rest of the layout is identical to the frontpage, or the settings applied on the gars.php file.

gothic
05-12-2006, 08:50 PM
In addition, I get an error when choosing any other order than random...

Anyone?
I used THIS (http://www.thevbgeek.com/showpost.php?p=8017&postcount=11)from above to sort the sorting, worked for me.
Find the code in the gars.php file.

Lygren
05-12-2006, 09:06 PM
Well, changing this get me:

Database error in vBulletin 3.5.0:

Invalid SQL:
SELECT g.threadid,g.header_image image, p.title, g.byline, IF(g.synopsis, g.synopsis, p.pagetext) synopsis ,round((g.overall_rating/10),0) author_rating, g.overall_rating author_rating_percent,round((g.avg_rating/10),0) member_rating, g.avg_rating member_rating_percent ,g.pagecount, g.custom2 FROM
bb_gars g

INNER JOIN bb_thread t ON g.threadid = t.threadid
INNER JOIN bb_post p ON t.firstpostid = p.postid
WHERE t.visible = 1 AND t.open != 10
AND t.forumid in (67,68,69)

ORDER BY g.threadid RAND() LIMIT 5;

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'RAND() LIMIT 5' at line 9
Error Number : 1064
Date : Friday, May 12th 2006 @ 11:06:58 PM
Script : http://avforum.com/
Referrer :
IP Address : 85.166.26.160
Username : lygren
Classname : vb_database

smo
05-12-2006, 10:14 PM
OK, when choosing "YES" to cleaning file output the above error is gone, but no articles are appearing on the front-page...

In addition, I get an error when choosing any other order than random...

Anyone?

I did what you did and I too have no article.

I was getting a white page of death before.

The Geek
05-13-2006, 07:54 AM
DO you guys have vbacmps running on all pages?

Lygren
05-13-2006, 05:20 PM
Yes, I believe vba is used as a frame on all our pages, including the forum.

gothic
05-13-2006, 06:34 PM
Yes, I believe vba is used as a frame on all our pages, including the forum.
Only if you install THIS (http://www.vbadvanced.com/membersarea.php?do=viewusermanual&productid=4&pageid=6) hack

Lygren
05-14-2006, 01:01 PM
Yes, that hack has been installed... Any possibilty of using this vBa module although we have installed the mentioned hack?

gothic
05-14-2006, 01:14 PM
Yes, that hack has been installed... Any possibilty of using this vBa module although we have installed the mentioned hack?
Using both that hack and the vBA module really does upset the layout of the portal page.
The way I overcame that was to uninstall that hack and then install THIS (http://www.vbulletin.org/forum/showthread.php?t=91888&highlight=left+column) hack to provide a left column. I have messaged the author who was not very keen on my spreading him hack around on a site that has no license check (sorry Geek, no offence meant m8 :D)

Lygren
05-14-2006, 05:46 PM
Thanks, gothic... We really would prefer to not be able to use this alteration, as we have based a lot of layout elements on this setup...

Any hope of using this module even though we keep out vBa-controlled layout mr Geek?

Lygren
05-14-2006, 08:35 PM
We solved the various issues, but one remains;

When trying to display the threads using alternative 2 (picture and text), displaying more than one article/test etc. gets a wrong formatting in Explorer.

Please have a look at the attachment...

Any suggestions?

gothic
05-14-2006, 08:59 PM
We solved the various issues, but one remains;

When trying to display the threads using alternative 2 (picture and text), displaying more than one article/test etc. gets a wrong formatting in Explorer.

Please have a look at the attachment...

Any suggestions?
The way I fixed that was to edit the 'adv_portal_gars_bit2' template, at the top it has:
rowspan="3"
I altered that to
rowspan="2"
Got mine live now HERE (http://www.cornishserver.com)

Lygren
05-14-2006, 09:05 PM
Thanks, that did the trick! :)

Praetorian
05-15-2006, 07:35 AM
Any screens of what it looks like?

Lygren
05-16-2006, 08:53 PM
Have a look at www.AVforum.com.

Still running 1.01, probably the reason why we can't get the module to work perfectly... For example, the frontpage is not showing the synopsis, although instructed to...

gothic
05-16-2006, 09:04 PM
You can have a butchers at mine: CornishServer (http://www.cornishserver.com)

Lygren
05-16-2006, 09:07 PM
Can you get the synopsis to work, gothic? On my setup, the text is pulled from the main text although I write a synopsis...

gothic
05-17-2006, 03:52 AM
Can you get the synopsis to work, gothic? On my setup, the text is pulled from the main text although I write a synopsis...
Got to admit that we haven't written synopsis yet. When everything is up and running, and we start populating the news manually we will start using more features :(

defcon420
05-17-2006, 09:20 AM
okay so whats the verdict guys? is 2.0beta stable and reasonably bug free and does this plugin perform? apart from the file edit is there any other problems that have surfaced?
sorry for the 50 questions, just wanna know how it is.

gothic
05-17-2006, 10:37 AM
Gotta be honest and say that the only cause for concern is the bbcode not being parsed within the vBA mod. Other than that I have found no issues.
I do have it live, albeit not fully operational. (see my last post here)

The Geek
05-17-2006, 01:49 PM
I havent had any problems with it - but as I stated in the first post - it was more or less a bone I was throwing out in hopes someone else would pick it up.

Then again that seldom happens :)

I look back into it when I have time. I think it works for most situations. Depends on what you need.

gothic
05-17-2006, 02:25 PM
I havent had any problems with it - but as I stated in the first post - it was more or less a bone I was throwing out in hopes someone else would pick it up.

Then again that seldom happens :)

I look back into it when I have time. I think it works for most situations. Depends on what you need.
I sincerely hope you didn't misunderstand me.... (possibly, that last was posted before my first injection of pure-caffiene ) I really am 'dancing round in circles and throwing my arms round wildly' happy with the module
:D :D

defcon420
05-17-2006, 02:40 PM
yah this module is a bit of fun and i really thank you for spending the time to do it, actually it gave me a bit of inspiration to install GARS 2 beta 1 and work with the old ioncube.
Install Sucess :)
just playing with the formatting images checkin for bugs n alike.
Great job again Geek i'll be buying another copy very shortly for another website of mine.

The Geek
05-17-2006, 03:10 PM
Sorry guys - I didnt mean to come across harsh - I was just saying it was a bone I was throwing out and I know it needs some more attention. I was just hoping more would give it that attention aside from me as I want my code time to go into the big 2.0 :D

defcon420
05-20-2006, 02:41 PM
hmmmm geek can u update the install +1
I have 2 sites with GARS now and i can only click install once here ;)
ty

The Geek
05-20-2006, 04:44 PM
hehe. Thanks. I doubt it will help me to win HoTM here though :)

THe install thing is just a test of the add on I released. IMO it needs some more attention - I would just rather spend that attention on other issues right now :)

dwbro1
06-04-2006, 02:48 AM
I'm have a little problem with the image not displaying here is the path that it is trying to load from on the display

http://www.mydomain.org/forumshttp://www.mydomain.org/forums/geek/gars/images/2/tor.gif

I have played with the default image path in the gars.php file over and over and nada. Any thoughts?

The Geek
06-04-2006, 07:25 AM
eh? whats the value in your GARS.php file for:
$url_to_default_image

dwbro1
06-04-2006, 05:22 PM
/types/3/default.jpg The path that is showing up on the broken link is right except it puts to copies of the website url ie.

http://www.mydomain.org/forumshttp://www.mydomain.org/forums/geek/gars/images/2/tor.gif

The Geek
06-04-2006, 09:24 PM
try putting in the full URL base

Ramses
06-07-2006, 05:58 PM
Hey, that's a very sweet module, thanks for it. It would be perfect for my needs if it would be possible to show the latest reviews/articles. Please make the bone more big geek, thanks :)
Edit: I saw it's already possible to change the order :) Only the problem now is if changing the order to asc or desc it gives following db error:
Invalid SQL:
SELECT g.threadid,g.header_image image, p.title, g.byline, IF(g.synopsis, g.synopsis, p.pagetext) synopsis ,round((g.overall_rating/10),0) author_rating, g.overall_rating author_rating_percent,round((g.avg_rating/10),0) member_rating, g.avg_rating member_rating_percent ,g.pagecount, g.custom2 FROM
vb3_gars g

INNER JOIN vb3_thread t ON g.threadid = t.threadid
INNER JOIN vb3_post p ON t.firstpostid = p.postid
WHERE t.visible = 1 AND t.open != 10
AND t.forumid in (68,63)

ORDER BY DESC LIMIT 3;

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DESC LIMIT 3' at line 9

The Geek
06-07-2006, 06:54 PM
hmmmmm Odd one. Ill check it out when I get back home :)

Cliff
06-07-2006, 09:16 PM
I just tried this and I don't get any errors, but I also don't get any output.
I read through the posts.
Any suggestions?

Ramses
06-07-2006, 10:35 PM
You assigned a forum ID in the gars.php?

dwbro1
06-08-2006, 02:17 AM
try putting in the full URL base

Nope same thing.. Two full urls show up first one to base forums dir then second is full to path.

ex..

http://www.mydomain.org/forumshttp://www.mydomain.org/forums/geek/gars/images/2/spinoza.jpg

dwbro1
06-08-2006, 02:45 AM
FYI I changed the path in gars.php to nothing and the same dirs above came up. I put a path in there that was totally bogus and the same paths came up.

The Geek
06-12-2006, 10:56 AM
if you can PM me an ftp and admincp url/account ill check it out for you.

ang2el
06-12-2006, 01:30 PM
what does it do? I mean this VBA module? I was looking for "Random Review" page as Geek has done in www.thevbgeek.com

thanks

Ramses
06-12-2006, 02:26 PM
what does it do? I mean this VBA module? I was looking for "Random Review" page as Geek has done in www.thevbgeek.com

thanks
It is the Random Review modul you can see on thevbgeek.com

ang2el
06-12-2006, 05:08 PM
thanks Ramses

ang2el
06-12-2006, 05:44 PM
i did according to the instruction but my page didn't open when I applied the module... any clue why?

The Geek
06-12-2006, 07:09 PM
which page?

sab2000sab
06-12-2006, 09:06 PM
Hey, that's a very sweet module, thanks for it. It would be perfect for my needs if it would be possible to show the latest reviews/articles. Please make the bone more big geek, thanks :)
Edit: I saw it's already possible to change the order :) Only the problem now is if changing the order to asc or desc it gives following db error:
Invalid SQL:
SELECT g.threadid,g.header_image image, p.title, g.byline, IF(g.synopsis, g.synopsis, p.pagetext) synopsis ,round((g.overall_rating/10),0) author_rating, g.overall_rating author_rating_percent,round((g.avg_rating/10),0) member_rating, g.avg_rating member_rating_percent ,g.pagecount, g.custom2 FROM
vb3_gars g

INNER JOIN vb3_thread t ON g.threadid = t.threadid
INNER JOIN vb3_post p ON t.firstpostid = p.postid
WHERE t.visible = 1 AND t.open != 10
AND t.forumid in (68,63)

ORDER BY DESC LIMIT 3;

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DESC LIMIT 3' at line 9
Was there any solution to this.. I get this error no matter what settings I put in..

Ramses
06-12-2006, 10:43 PM
Was there any solution to this.. I get this error no matter what settings I put in..
If you choose random and assign a forum ID it should work (it does for me).
There seems no solution at this time now.

sab2000sab
06-12-2006, 11:09 PM
If you choose random and assign a forum ID it should work (it does for me).
There seems no solution at this time now.

Thanks for replying! I'll wait to see what happens with this.. lol..

Thanks again!

Sandra

ang2el
06-13-2006, 12:39 AM
which page?

My main VB CMPS page doesn't display just a white screen...

The Geek
06-13-2006, 07:26 AM
are you getting any sql errors emailed to you or any errors in the apache log?

dwbro1
06-13-2006, 07:49 AM
if you can PM me an ftp and admincp url/account ill check it out for you.

You have the PM now.. standing by :)

ang2el
06-13-2006, 03:01 PM
are you getting any sql errors emailed to you or any errors in the apache log?

No just a white page I didn't wait for minutes as I do it when site is live. but as soon as I remove the module it does work again.

The Geek
06-13-2006, 06:04 PM
Thats usually a site error that you will find in the apache log. You sure you checked apaches error log?

Ramses
07-03-2006, 09:27 PM
Master of the GARS System and the whole universe, have you taken a look into the db error if choosen to show the latest reviews/articles?
Thanks

The Geek
07-04-2006, 12:27 AM
er... not yet. Im on someone elses laptop until I get home. Just make sure its in the tracker and ill get to it asap :)

DJ XtAzY
07-06-2006, 05:30 PM
heres the fix for peeps who are using the DESC order


<?php

//SETTINGS

$forumids = "212"; // Comma seperated list of forumids
$limit = 3; // How many items to show
$title = "Latest Articles"; // Module Title
$featured = 0; // 1= Only featured items
$url_to_default_image = "types/3/default.jpg"; //Relative URL to default image from geek/gars/images folder
$vertical = 0; // 1= Vertical (only for template 1 or 3)
$preview = 0; // 1= Show preview
$ratings = 1; // 1=show ratings
$template = 2; // 1=simple with pic, 2=big with pic, 3=Listing no pic
$order = 1; // 0 = rand, 1=desc, 2=asc
$maxchars = 150; // Maximum amount of chards to snip

// END SETTINGS

switch ($order)
{
case 0:
$order = "RAND()"; $thread = ""; break;
case 1:
$order = "DESC"; $thread = "threadid"; break;
default:
$order = "ASC"; $thread = "threadid";
}
if (!$limit)
{
$limit = "1";
}



$sql = "SELECT g.threadid,g.header_image image, p.title, g.byline" .
($preview ? ", IF(g.synopsis, g.synopsis, p.pagetext) synopsis " : "") .
($ratings ? ",round((g.overall_rating/10),0) author_rating, g.overall_rating author_rating_percent,round((g.avg_rating/10),0) member_rating, g.avg_rating member_rating_percent " : "" ) .
",g.pagecount, g.custom2 $customfields FROM
" . TABLE_PREFIX . "gars g
" . ($customfields ? " INNER JOIN " . TABLE_PREFIX . "gars_custom_values gsv ON gcv.custom_threadid = g.threadid " : "") . "
INNER JOIN " . TABLE_PREFIX . "thread t ON g.threadid = t.threadid
INNER JOIN " . TABLE_PREFIX . "post p ON t.firstpostid = p.postid
WHERE t.visible = 1 AND t.open != 10
" . ($forumids ? " AND t.forumid in ($forumids) " : "" ) . "
" . ($featured ? " AND g.feature_untill> " . TIMENOW : "") . "
ORDER BY $thread $order LIMIT $limit";

$results = $db->query_read($sql);
$modulehtml = "";
$x = 0;
$bburl = $vbulletin->options['bburl'];
if ($template==2)
{
$vertical = 1;
}
while ($result = $db->fetch_array($results))
{

if (!$result['image'])
{
$result['image'] = $vbulletin->options['bburl'] . "/geek/gars/images/" . $url_to_default_image;
}
elseif (substr($result['image'], 0, 1) == ".")
{
$result['image'] = $vbulletin->options['bburl'] . substr($result['image'], 1);
}
else
{
$result['image'] = $vbulletin->options['bburl'] . $result['image'];
}

if ($parsebb && $template!=3)
{
$result['message'] = $bbcode_parser->do_parse($result['synopsis'], 0, 1, 1, 1);
}
else
{
$result['message'] = strip_bbcode($result['synopsis']);
}

if (strlen($result['message']) > $maxchars)
{
$result['message'] = substr($result['message'], 0, strrpos(substr($result['message'], 0, $maxchars), ' ')) . '...' . ($template!=3 ? construct_phrase($vbphrase['read_more'], $vbulletin->options['bburl'], $result['threadid'], $session['sessionurl']) : "");
}
eval('$bits = "' . fetch_template('adv_portal_gars_bit' . $template) . '";');
if ($vertical)
{
$modulehtml .= "<tr>$bits</tr>";
}
else
{
$modulehtml .= $bits;
$x++;
}

}
if ($modulehtml)
{
$mods['colspan'] = ($template==2 ? 3 : $x);
$mods['title'] = $title;
$mods['collapse'] = $mods['modid'];
$modcollapse = $vbcollapse["collapseobj_module_" . $mods['modid'] . ""];
$modimgcollapse = $vbcollapse["collapseimg_module_" . $mods['modid'] . ""];
if (!$vertical)
{
$modulehtml = "<tr>$modulehtml</tr>";
}
$home[$mods['modid']]['content'] .= $modulehtml;
}


?>


i also modified the code to list the Latest X Articles... take alook at my site for demo

http://www.animeost.net (it will say latest uploaded ost)

The Geek
07-13-2006, 04:54 PM
Just updated the zip with the asc/desc fix. Didnt notice DJ's update here, though both will be fine.

Not sure what Latest X Articles functionality youre talking about thou? Could you elaborate DJ?

Thanks

DJ XtAzY
07-14-2006, 03:38 PM
well instead of allowing only articles that will show up based on the forumids u entered, i have it so that any latest articles will show up on any forums. Because my site have many subforums in one section... it'll be a pain to find all those forum ids and enter it in that field.

Ramses
07-24-2006, 02:39 PM
For me the templates are still not showing properly also I tried to change as described in some previous posts. Any hints for it?

@Geek
I added a comment to the closed GARS Issue #110 and don't know if you get informed about it. Thanks.

The Geek
07-24-2006, 04:19 PM
can you provide a screen shot?

No, I dont get updated on those. Ill see if I can dig it up. If not, just re-open a new one :)

Ramses
07-24-2006, 04:50 PM
Thank you, I saw the status is now "new" (ticked boxes custom fields)
Here the screenshot attached from the gars block.
Seems there is an error only if a review is not rated?

The Geek
07-24-2006, 05:16 PM
Sorry, is that with THIS modification?

Ramses
07-24-2006, 05:58 PM
Yes :) thats why I put it here in. Anything is wrong with the adv_portal_gars_bit2 template.

The Geek
07-24-2006, 08:54 PM
Must be...ill look into it.

Thanks!

JimmyJames
07-27-2006, 09:42 PM
For some reason, my mod isnt pulling in any images or text.

The mod table is there and ready to go, but no content. I checked my settings to make sure I have the right forum id and have already gone over everything else thrice! Any suggestions?

http://www.themobilebeat.com

The Geek
07-27-2006, 10:01 PM
Huh. I would have thought no block would even show if results were negative.

The forumid and type is all cool?

What version of vB are you running?

JimmyJames
07-27-2006, 10:13 PM
Huh. I would have thought no block would even show if results were negative.

The forumid and type is all cool?

What version of vB are you running?

Im running 3.5.4

yeah, the forums id is good to go: its 3

What do you mean by forum type? I have it set to review if thats what you mean;)

The Geek
07-27-2006, 10:23 PM
can you add another review at all and see if it appears?

JimmyJames
07-27-2006, 10:45 PM
can you add another review at all and see if it appears?

Sure thang: still notta:(

http://www.themobilebeat.com

gothic
07-29-2006, 12:46 PM
I know that sometime a short while ago I brought up the subject of displaying GAL's in the vBA GARs block, and that we sorted it......
But I just can't find it here at all.. :rolleyes: :rolleyes:

Anyone suggest how I can display GAL's in this brilliant module please?

Don't worry, just played around with the code used to make GAL's work in the vBA News module :D :D
All working now.

gothic
07-30-2006, 06:41 AM
Guys, I am frustrated! been trying to sort out a small display discrepency which is slightly annoying, and after an almost all-night session am still none the wiser (probably less understanding now than I was when I started!)

In the vBA-CMPS display the linebreaks and text formatting have all been stripped, as in image number one.

In the News forumdisplay, GAR's Article type, the line breaks are there, but text formatting gone awol, as in image number two

In the articledisplay all is perfect, as in image number three.

Is there a fairly simple way for me to return the text formatting and line breaks to the vBA-GARS module body display please? or atr least an idea of where to look so I can experiment :eek:

The Geek
07-30-2006, 07:33 PM
Image 1 is the template for this module so you can edit its templates. Image 2 I suppose is the gars_threadbit image. Formatting isnt wonky... there just isnt any formatting by design. Youre best to use the synopsis box if you want to format it.

Does that help?

gothic
07-30-2006, 09:03 PM
I'll plod on, thankyou Geek

Ramses
07-31-2006, 10:04 AM
All right, I created the template new, but one question is left.
I have the setting to show the newest reviews, but there seems a difference between the normal latest vb threads sorting, is it sorted only by the time of creation of the review and not the last comment? If so, how can I change it to sort by the latest comment? Also I think there's anything wrong with the caching of the whole box, for example if I move a thread to a review forum it is not listed in the box, but should. Thank you.

altsounds
08-08-2006, 11:59 PM
I have an issue where the images don't show up for me. Any ideas?

The Geek
08-09-2006, 08:17 AM
what version of GARS and vB are you using?

altsounds
08-09-2006, 02:17 PM
what version of GARS and vB are you using?

I am using 3.5.4 and the latest beta version of GARS. I am about to upgrade my vbulletin to version 3.6 though.

altsounds
08-11-2006, 05:41 PM
OK I figured out the issue and it is because my forum is in root. The images were pasting the URL of my forums and then the full URL of the image (including my forum URL again). If I leave my forum URL blank this works HOWEVER doing this messes up things like my RSS feeds as it doesn't give a full URL to my threads and any e-mail messages I get etc.

Any idea how to fix that?? BTW I am nw on 3.6.0 and RC3.

The Geek
08-11-2006, 09:39 PM
Not sure. Im looking back into this as its no longer working on one of my sites.

altsounds
08-14-2006, 01:55 PM
Not sure. Im looking back into this as its no longer working on one of my sites.

Any news on this??

The Geek
08-14-2006, 02:49 PM
Not yet... Im still ov vacation!

altsounds
08-15-2006, 08:43 AM
Not yet... Im still ov vacation!

I got it now anyway. It was calling the vburl at the beginning and on the image call causing it to pull in the VBURL twice. I removed it from the image portion and replaced with "" and nowall works fine.

The Geek
08-15-2006, 08:56 AM
Thanks for the heads up.

Fleabag
08-20-2006, 12:23 AM
This works well, thanks a lot! :)

allsoppg
08-20-2006, 11:54 AM
how would i do this on vb3.6 and the latest version of gars

i dont see this option in the "type" section :confused:

Shack Networks
08-21-2006, 01:58 PM
Is it me or does it not parse BB code on the block.. ?

Anyway to make it parse BB code ?

Shack Networks
08-21-2006, 05:57 PM
Answered it myself...

Find

$maxchars = 600; // Maximum amount of chards to snip

Add Under

$parsebb = 1;

Thanks to my m8 Gaf for sorting it..

JFYI

maxchars may be diff on your gars.php module php

ang2el
08-25-2006, 04:12 AM
Is this the random review shown in the homepage and if yes does it work with vb3.6 ?

The Geek
08-25-2006, 07:34 AM
Yes. No. After I upgraded one of my sites to 3.6 It stopped working. However it shouldnt be too big of a deal (it may also just be my site)

chrisj8221
08-31-2006, 11:32 PM
Followed the tutorial on setting up module for vb advance and here is what it looks like
503
I am assuming it must be a mistake in the template code to do with <tr> or <td>. copied the code out of the tutorial so am assuming it should be fine.

Any ideas? code in templates shown for better understanding.


...bit1
<if condition="$vertical"><tr></if><td class="alt2" align="center">
<a href="$bburl/showthread.php?t=$result[threadid]" title="$result[title]">
<img alt="$result[title]" src="$result[image]" style="border: 2px #000000;padding:2px;" /><br />
<strong>$result[title]</strong></a><div class="smallfont">$result[byline]</div>
</td>
<if condition="$vertical"></tr></if>

... bit2
<td class="alt1" rowspan="3" valign="top">
<a href="$bburl/showthread.php?$session[sessionurl]t=$result[threadid]"><img src="$result[image]" border="0" style="border: 2px #000000;padding:2px;" alt="$result[title]" /></a>
</td>
<td class="alt2" valign="top" width="100%" colspan="2" title="Read More">
<div>
<a href="$bburl/showthread.php?$session[sessionurl]t=$result[threadid]"><strong>$result[title]</strong></a>
<if condition="$result[byline]">
<div class="smallfont">$result[byline]</div>
</if>
<if condition="$result['message']">
<div class="smallfont"><hr>$result[message]</div>
</if>
</div>
</td>
</tr>
<if condition="$result['author_rating'] || $result['member_rating']">
<tr>
<if condition="$result['author_rating']"><td class="alt1" style="white-space:nowrap;" <if condition="!$result['member_rating']">colspan="2"</if>><span class="smallfont">Author rating</span></td></if>
<if condition="$result['member_rating']"><td class="alt1" style="white-space:nowrap;" <if condition="!$result['author_rating']">colspan="2"</if>><span class="smallfont">Member rating</span></td></if>
</tr>
<tr>
<if condition="$result['author_rating']"><td class="alt2" <if condition="!$result['member_rating']">colspan="2"</if>><img class="inlineimg" src="$stylevar[imgdir_rating]/gars_$result[author_rating].gif" border="0" alt="Author rating: $result[author_rating_percent]%" /></td></if>
<if condition="$result['member_rating']"><td class="alt2" <if condition="!$result['author_rating']">colspan="2"</if>><img class="inlineimg" src="$stylevar[imgdir_rating]/gars_$result[member_rating].gif" border="0" alt="Member rating: $result[member_rating_percent]%" /></td></if>
</if>
<tr>
<td class="tcat" style="padding:0px;" colspan="3"><span class="smallfont">&nbsp;</span></td>

... bit3
<td class="alt2" align="$stylevar[left]">
<a href="$bburl/showthread.php?t=$result[threadid]" title="$result[message]">
<strong>$result[title]</strong></a><if condition="$result['byline']"><div class="smallfont">$result[byline]</div></if>
</td>

I'm sure it is something silly that I have missed.

Thanks in advance.

Chris

Lionel
09-03-2006, 11:59 PM
How can I set the image width myself?
I can get the first image by adding a counter, and I'd like to make that image 400px and using a different template instead of the preset 75 (which will remain for the other ones)

ang2el
09-04-2006, 03:43 AM
Does it work with CMPS 2.2.0 & vb 3.6? I want to set up this feature. Please help me.

The Geek
09-04-2006, 06:09 AM
I havent tested it on those Angel. I will be checking it out this week though.

Lionel - Im not too sure on that. Can you not just make a copy of the module and set it up as a seperate one in vba?

gothic
09-04-2006, 06:37 AM
We got the block working fine with vBA 2.2.0 & vB 3.6.0 :D

Lionel
09-04-2006, 08:30 PM
Lionel - Im not too sure on that. Can you not just make a copy of the module and set it up as a seperate one in vba?

I got around it by using the vbadvanced news module as the first module. There is a mini vbadvanced hack that allows you to select any article for the front page bu selecting an admin only thread icon. So in that module I am able to resize image.

Boy, 4 days with Gars and I am absolutely amazed. I did get an error though, trying to accomplish something with new version.

The Geek
09-04-2006, 08:46 PM
Thats good news (well - not the error bit!)

benj
09-04-2006, 09:24 PM
sorry i may have missed something but what do these 3 different layouts show? random article ? last X articles or something else ? cheers :D

chrisj8221
09-05-2006, 02:47 AM
still no ideas on my "loooooong" post earlier?

Chris

The Geek
09-05-2006, 07:02 AM
benj - yes
Chris - in honesty I havent looked into it yet. Yes there is a layout issue when showing more than 1.

chrisj8221
09-05-2006, 09:37 PM
ok - thanks. let me know when you have some ideas.

cheers

benj
09-05-2006, 11:38 PM
works a treat for me thanks :D

benj
09-05-2006, 11:49 PM
ops when i decided to use template "2" i got a wierd result any ideas ? :D

Lionel
09-06-2006, 02:22 AM
Benj it is just a matter of adjusting your template. If it's ok with Thegeek, I will post mine and hopefully that will put this matter to rest.

The Geek
09-06-2006, 06:44 AM
That would be cool Lionel

Lionel
09-06-2006, 07:04 AM
here you go

WiBu
09-06-2006, 11:56 AM
This is probably a simple question to answer but here it goes anyway. Can you use custom fields with this module via template edits?

benj
09-06-2006, 12:39 PM
here you go


cheers mate :D

benj
09-06-2006, 01:07 PM
i had a little mess around any ideas how i would maybe make each news item comeup in its own table..... obviously i think id neeed to not use the container and maybe copy the surrounding container code into gartemplate 2 ?

The Geek
09-06-2006, 07:06 PM
Updates with Lionels change. Also added a variable to the file to toggle the custom fields (though I havent really tested it).

nJoy

benj
09-10-2006, 11:33 AM
i posted this on vbadvance but ive yet to get an answer so i thought id try here... any ideas how i would get $result[title] to display in the module "titlebar" instead of the title. i know its possible because the vbad new modules does it..

WiBu
09-10-2006, 11:40 PM
Does this module parse the forumid of an article? If not is there a way to do so?

I'm looking to have an icon by the article on the cmps page; a stay for reviews, a question mark for rumors, a pen for articles etc with the corresponding link. This is easily done with a statment like this <if condition="in_array($forumid, array(X,Y,Z))"> HTML here </if> but requires $forumid of the article to be parsed.

Lionel
09-10-2006, 11:44 PM
WiBu, what I did was copying the module and set many modules to display: one for news, one for sports and so one and I set each specific forumid in its module

WiBu
09-11-2006, 12:15 PM
WiBu, what I did was copying the module and set many modules to display: one for news, one for sports and so one and I set each specific forumid in its module
Usually I would have done that but the layout I'm creating is somewhat unique. I think I may be able to get the forumid parsed by ripping code out of another module.

The Geek
09-11-2006, 10:31 PM
wiBu - edit the module file and stick t.forumid in the select clause (something like: SELECT g.threadid, t.forumid,

Benj - did you get your answer yet?

benj
09-11-2006, 11:06 PM
wiBu - edit the module file and stick t.forumid in the select clause (something like: SELECT g.threadid, t.forumid,

Benj - did you get your answer yet?


nope but ive found a nice work around :D

still would like to know for the future if anyone knows

WiBu
09-12-2006, 10:11 PM
wiBu - edit the module file and stick t.forumid in the select clause (something like: SELECT g.threadid, t.forumid
Exactly what I ended up doing. Thanks for giving me reasurance that it was correct :).

smo
09-14-2006, 02:48 AM
I finally got it woking on my vba however the css isnt like the other things on vba. take a look.

www.slaptardcentral.com (http://www.slaptardcentral.com)

notice a few diff theme choices tehre and see that in some of them the colors and font are unreadable.

soultrader
09-14-2006, 05:00 AM
Hello,

Sorry for the newbie question. I am still new to coding and vbulletin.

I woud like to install this hack but I have some problems doing so. First, I would like to know if this hack will enable me to bring the most review on my vbadvanced site index page as a module.

If so, I do not know how to edit the gars.php file accordingly. In the instructions it says "Edit gars.php and set up the first lot of settings". I have no idea what this means. Can anyone help me with this problem? Thank you

Lizard King
09-14-2006, 06:19 AM
You have to use a program like Editplus , Notepad to edit php and xml files. I advise you to start learning quickly. Otherwise don't touch your scripts at all. Just hire someone to do it for you. You can mess everything up ( not with only editing gars.php but there will be hacks you need to edit vbulletin files and even one line is wrong your forum will come to its knees.

The Geek
09-14-2006, 07:29 AM
As Lizard says; open the file in notepad and you will see that the first section has instructions for making changes.

Lionel
09-14-2006, 11:49 AM
What determines the size of the thumbwidth and how can i disable it? I have some modules displaying in main column and some in side columns. The one in side columns I'd like to use my own resizer so they get bigger.

The Geek
09-14-2006, 12:18 PM
This block only shows what is already in GARS. If you want to control GARS resizing... edit your settings.

soultrader
09-14-2006, 01:22 PM
As Lizard says; open the file in notepad and you will see that the first section has instructions for making changes.

Hello Geek,

I think I may be able to edit the php file.... I do have one question.

What exactly does this hack do? Can I bring a GARS module and place it on my home index page?

soultrader
09-15-2006, 03:06 AM
Thank you Geek. I got this to function on 3.6 and it works perfectly. :)

good2laugh
09-15-2006, 05:27 AM
Just installed this with GARS 2.0 Gold and VB 3.61, all seems to be working ok - Crosses fingers :)

Thanks :)

soultrader
09-15-2006, 06:20 PM
I tried changing the default pic in the php file but the only pic that will appear is the default pic. What am I doing wrong?

Also I noticed that this module only pulls out threads out of forums that have gars enabled? Is there no way to pull threads from forums that do not have gars enabled? thank you

The Geek
09-15-2006, 08:15 PM
It will pull the header image or the types default image. There isnt a way to pull a non gars forum - its a gars add on ;) however Im sure you can use any of the existing vba modules for this

Hornstar6969
09-16-2006, 03:32 PM
you can see mine installed here www.gamerzneeds.net however it has a white background instead of the skin background, is there anyway i can have the sites skin background to show?

The Geek
09-17-2006, 06:29 PM
hmmm. Thats odd. Check out the adv_portal_gars_bit template

Hornstar6969
09-17-2006, 09:44 PM
hmmm. Thats odd. Check out the adv_portal_gars_bit template

I'm not very cluey with that by i'll check anyway, however i changed to the default template, and i noticed it gives a colour there, so thought that may help.

Ramses
09-19-2006, 04:09 PM
Anybody have an idea how I can get the forum name listed under each listing/image?

The Geek
09-19-2006, 05:48 PM
Does this help? http://www.thevbgeek.com/showpost.php?p=12055&postcount=133

Ramses
09-19-2006, 10:47 PM
Ok, did this and get it pointing to the right forum now, but how can I get it showing the forumname? $result[forumid] doesn't work. Thank you.

Orangeflea
09-20-2006, 03:14 AM
Hey, Geek, how are you? Great product, but I'm having some problems here.

1.) There is something amiss with the adv_portal_gars_bit2 template, either an unclosed code or something because the background scheme and color of my article blocks is the same as the background scheme of the mod title and collapse button. It's totally off. (see attachment)

2.) The article bot is conflicting with the reviewpost index mod (inc_reviews.php). To be more specific, when I add a module title to gars.php document, that same title appears on the reviewpost block, underneath the product images.

3.) I don't like how the forums look with the huge article blocks and whatnot. I would like the list of articles, reviews, etc in my GAR forums to continue to resemble normal Vbulletin threads, or something like this: http://absolutepunk.net/forumdisplay.php?f=166 or http://www.thevbgeek.com/forumdisplay.php?f=53

4.) I hate to keep using his site, but... http://absolutepunk.net/index.php? If you notice, his GAR blocks on the Vbadvanced page is able to show the number of comments/replies for the corresponding article. I've noticed, too, that on your salongeek site, you have the same customization. I haven't seen an option to turn that on or a way to do it on my vbadvanced.

Please help.

The Geek
09-20-2006, 07:41 AM
hmmm. Ill take a look at it today.

Orangeflea
09-20-2006, 04:38 PM
Thanks, Geek. I full appreciate the richness and depth of this product, but unfortunately, visitors and members are only interested in the final results, and I can't make this thing go live until these issues have been addressed.

The Geek
09-20-2006, 10:09 PM
I understand flea, however remember that this is an unsupported beta add on for another product. It isnt gars, just a way to provide a tool for vbacmps users to display a module for gars. I havent been able to get to it today as I have been balls out on GAL, so it will be a few more days till I get to it as Im out of town Thursday and Friday.

Orangeflea
09-20-2006, 10:35 PM
I don't necessarily see it as an add-on for another product (vba), but an extension of yours, to make front-page visitors more aware of GARS and to observe its functionality. To be perfectly honest, I wanted GARS to be showcased on our main page since the site will rely heavily on front-page articles and reviews, and that was one of the key reasons why I purchased it.

If I can't have GARS on my main page, operating normally, I'm SOL.

The Geek
09-20-2006, 11:00 PM
Of course its an add on for vba, it wouldnt run without vba and it was written specifically for vba. GARS doesnt provide vbacmps support - this is an unsupported beta add on for those that asked if I could put something together for vba. Regardless, if you post your settings ill take a look at it (most likely Friday night as Im out of town till then)

Orangeflea
09-21-2006, 12:05 AM
I know it's technically an add-on for VBA, but personally, I think it serves your product (GARS) better than it does for VBA. A mod like this doesn't only give your product more exposure (as front page visitors will be able to see it), but it doesn't limit GARS to only a forum setting. What I'm saying is, with this mod, people will see GARS as an essential element to a front page design as well as a forum feature, and I'm just surprised that you would choose to have a slightly dismissive attitude toward a mod that can only give GARS more exposure and a stronger presence on individual websites. :)

Which settings area did you specifically want to see, Sir Geek?

gothic
09-21-2006, 05:29 AM
Hey, Geek, how are you? Great product, but I'm having some problems here.

1.) There is something amiss with the adv_portal_gars_bit2 template, either an unclosed code or something because the background scheme and color of my article blocks is the same as the background scheme of the mod title and collapse button. It's totally off. (see attachment)


Please help.

I can help you with this one, the first three lines of gars_bit2 are:
<td><table width="100%" border="0" cellspacing="0" cellpadding="4" style="border: 1px inset #999966" bordercolor="#999966">
<tr>
<td valign="top">
<table border="0" align="left" cellpadding="0" cellspacing="0">

Change it to
<td><table width="100%" border="0" cellspacing="0" cellpadding="4" style="border: 1px inset #999966" bordercolor="#999966">
<tr>
<td class="alt1" valign="top">
<table border="0" align="left" cellpadding="0" cellspacing="0">

Orangeflea
09-21-2006, 06:41 AM
Terrific!

That worked! Thanks, Gothic!

That's one big problem down :)

WiBu
09-21-2006, 11:51 AM
Right, I'm back with another help question.

Is it possible to insert something a certain number of articles in? For example, the first five articles are all displayed in a linear fashion, I'd then like a banner to be after the first five articles and then for the articles to continue. Possible? (I just need the PHP stuff, the template code is easy enough to do)

ziG
09-22-2006, 10:15 PM
id like to use this with vbportal (phpportals.com)

im not sure how to go about doing this, is it possible? i'm pretty sure it should be possible but I'm uncertain as to how to go about adding this to vbportal.

Orangeflea
09-23-2006, 12:06 AM
I still have these lingering issues:

The mod is conflicting with the reviewpost index mod (inc_reviews.php). To be more specific, when I add a module title to gars .php document, that same title appears on the reviewpost block, underneath the product images.


I hate to keep using his site, but... http://absolutepunk.net/index.php? If you notice, his GAR blocks on the Vbadvanced page is able to show the number of comments/replies for the corresponding article. I've noticed, too, that on your salongeek site, you have the same customization. I haven't seen an option to turn that on or a way to do it on mine.

Just need some assistance...

chrisj8221
09-23-2006, 02:03 PM
thanks to everyone for getting this to work :) :) :)

I will use it quite a bit on my site.

chris

Orangeflea
09-25-2006, 07:04 AM
This is beginning to frustrate me to no end. I just can't seem to figure it out.

http://www.thevbgeek.com/

The main site is running VBadvanced (I'm running Vbadvanced); it is also running GARS (I'm running GARS); they are both working in conjunction with one another (same with my site)...

But WHY can't I get a reply/view counter underneath each article block, along with the reply button set up on mine??!

Attached are comparison shots:

Lizard King
09-25-2006, 09:09 AM
This is beginning to frustrate me to no end. I just can't seem to figure it out.

http://www.thevbgeek.com/

The main site is running VBadvanced (I'm running Vbadvanced); it is also running GARS (I'm running GARS); they are both working in conjunction with one another (same with my site)...

But WHY can't I get a reply/view counter underneath each article block, along with the reply button set up on mine??!

Attached are comparison shots:
Because that is regular vb thread and news feature for vbadvanced.

I think you must be aware of what you are asking. Everything is not possible. If you want that you need to modify the query.

kj1
09-25-2006, 06:14 PM
I got it now anyway. It was calling the vburl at the beginning and on the image call causing it to pull in the VBURL twice. I removed it from the image portion and replaced with "" and nowall works fine.

Nope same thing.. Two full urls show up first one to base forums dir then second is full to path.

ex..

http://www.mydomain.org/forumshttp://www.mydomain.org/forums/geek/gars/images/2/spinoza.jpg


I'm having this problem also but cannot find the code that needs to be edited. Can you help please?

kj1
09-25-2006, 06:52 PM
I sorted it out by doing the following

if (!$result['image'])
{
$result['image'] = $vbulletin->options['bburl'] . "/geek/gars/images/" . $url_to_default_image;
}
elseif (substr($result['image'], 0, 1) == ".")
{
$result['image'] = $vbulletin->options['bburl'] . substr($result['image'], 1);
}
else
{
$result['image'] = $vbulletin->options['bburl'] . $result['image'];
}

replaced the above with

if (!$result['image'])
{
$result['image'] = $vbulletin->options[''] . "/geek/gars/images/" . $url_to_default_image; //replaced options 'bburl'
}
elseif (substr($result['image'], 0, 1) == ".")
{
$result['image'] = $vbulletin->options[''] . substr($result['image'], 1); //replaced options 'bburl'
}
else
{
$result['image'] = $vbulletin->options[''] . $result['image']; //replaced options 'bburl'
}

And that made the images work on the template 2 view.

Lionel
09-29-2006, 05:03 AM
I've got no more hair to pull. I am using 9 renames Gars module on my homepage. They are all the same, pulling from the same gars2 templates. Only the forums id are different. From time to time, one of them behaves in an irritating manner. The table that holds the thumb stretches such a way that it causes the entire home to stretch, all that for 2 seconds, as if the thumb was struggling invisibly, then that thumb appears and entire page returns to normal.

That behavior is only with IE. I think I pinpoint it to certain thumbs. What is particular with those thumbs? I have no idea. They are all good old jpg. All I know, if I disable that module of the moment, all is fine. And this is happening randomly with all 9 modules, so I cannot really say it's a specific module (specially they are all the same).

The way we operate, we also upload one of the main images as header image and this is what is displaying as thumb on homepage with the modules.

I am not sure about the following statement or even if that makes sense... I *think* that this is happening when the thumb is taller than the width. BTW I set them to be 75 pixels. They always display at 79 px.

The Geek
09-29-2006, 07:27 AM
Its because there is no height and width attributes to the img tag (because you could have any size in there). So IE likes to sometimes blow the image up until its fully downloaded. If the pics are always the same size, edit the template and put the attributes in.

HTHs!s

Lionel
09-29-2006, 07:57 AM
Which is making me ask you the question again. Where do you set image width for gars module. I don't want for it to take the thumb size. I want to use original size and force the width to a uniform width directly in module or template, which will be better for me as sometimes the image being taller, I have a vertical row of misaligned thumbs. In vbadvanced i was able to force the width directly in module, bypassing vbulletin's preset.

Lionel
09-29-2006, 09:03 AM
ok, since 95% of the time image is wider, I set the width at 79 pixels in template. The rare occasion that it is taller, I'll be loosing some resolution, that's all.

But why isn't this happening in the forumdisplay with the thumbs module?

The Geek
09-29-2006, 09:36 PM
hmmm. Got me. I dont record the thumbnail dimensions when uploading as it discards the original data. Therefore the size should be the exact same on threadbit as this.

Lionel
09-29-2006, 09:55 PM
hmmm. Got me.

don't be so sure. Since I set the width at 79 pix, in addition to have a nice consistent vertical row of images (and a couple of instances of distorted images), the problem has not occured. So I think that your theory could be right. Just the mystery remains why not on forumdisplay

Ramses
10-15-2006, 11:47 AM
Anybody got it to show the forum name for the gars entries and could share this please? Thanks

beduino
10-16-2006, 04:19 AM
i follow all the instructions
upload php file [editing forumid and image url], chmod 777
create 3 templates
create a php module - insert all the data.
the module don't appears in menu of pages and don't appears in homepage...the forum/gars what i link is the id 3, when I use a term set 'escritos'.
nothing appears
i certainly miss anything...:(
all the best
beduino

AyeCapn
10-17-2006, 02:23 PM
I got this working right away. I love you!

waltercat
10-22-2006, 08:46 PM
Can someone please help me figure out how to center an image. I've tried aligning everything to the center and nothing is working...

Robert
10-23-2006, 08:46 PM
I'd like to display the synopsis rather than the byline. Is that possible?

The Geek
10-24-2006, 11:28 AM
Yes, but you will need to tweak the template and most likely parse the BBcode of the synopsis.

benj
10-31-2006, 05:07 PM
any ideas how i could get the threads post icon to show in the vba module?

arachn1d
11-08-2006, 09:49 PM
Can someone tell me how to edit the gars_bit2 to be used without the module hell? because if I do click "no" then the format is really weird and the right column isn't right anymore.

(I'm trying to place the gars bit in the middle column)

any help would be greatly appreciated, thanks.
________
Cheap Glass Pipes (http://glasspipes.net/)

interfx
11-14-2006, 11:46 PM
I have an issue when a user has reviewed a product... The table is not correct... See attachment... tried a few different things, but can't find...

The Geek
11-15-2006, 06:00 PM
can you provide a URL?

interfx
11-15-2006, 09:50 PM
When I turned to Simple Format, and switched to Vertical it went away...

zkilzz
11-22-2006, 01:13 PM
Is there a way to have the top x listed vertically in CMPS? This would be a nice addition to this.

Marius

The Geek
11-22-2006, 05:11 PM
Off the top of my head, Im pretty sure you can do via changing its settings.

zkilzz
11-22-2006, 07:45 PM
Off the top of my head, Im pretty sure you can do via changing its settings.

I think you can only sort by random, A-Z and Z-A isnt that right?

The Geek
11-23-2006, 04:51 PM
There is a setting for vertical

zkilzz
11-24-2006, 09:15 PM
There is a setting for vertical

So by choosing vertical it will sort by most views etc?

The Geek
11-24-2006, 09:52 PM
By vertical do you mean layout or sort by a field ascending?

zkilzz
11-25-2006, 11:04 PM
By vertical do you mean layout or sort by a field ascending?

Here you can see the topx on the right side.

http://www.bilforumet.net/chum/forumdisplay.php?f=3&styleid=2

I want to add top x as a vbadvance block here

http://www.bilforumet.net/chum/cmps_index.php

In the php file for the GARS vbadvance block i cannot sort by most active or most read.

Thats what i want :)

The Geek
11-27-2006, 07:42 AM
No, its not configured for that, it would require customizing this file.

HTHs

VBP
12-15-2006, 08:29 PM
So can anyone tell me why bgcolor is not working? Or why the back ground is not the same as the default forum?

gothic
12-15-2006, 08:53 PM
So can anyone tell me why bgcolor is not working? Or why the back ground is not the same as the default forum?
Have a butchers here
(http://www.thevbgeek.com/showpost.php?p=12484&postcount=160)

p.s. maybe you should really try reading the previous posts :D or doing a search :rolleyes:

chrisj8221
12-19-2006, 03:59 AM
ok - here is a weird one for you. when i write an article and choose a custom image the file is uploaded to here
.../public_html/forums/geek/gars/images

in the forums area the photo shows fine in the thread
http://www.diyaudiobuilder.com/forums/showthread.php?t=12

buy on the front page the image does not show-up
http://www.diyaudiobuilder.com

upon some investigating i see where the one image that is showing up is located in this directory.../public_html/forums/geek/gars/images/2

all of the images use to show correctly on the index page and then - through some form of evil script upgrade or something, this new bug has appeared.

even if I copy the image from .../public_html/forums/geek/gars/images to here .../public_html/forums/geek/gars/images/2 is does not show up in the index page.

anyone have any ideas??

chris

The Geek
12-19-2006, 08:08 AM
Looks like a settings error in the module. The path for the image is http://www.myforum.com/forumshttp://www.myforums.com/forums/geek/images/2/xxx/jpg

in other words, it looks like you have 2 fully qualified paths in your settings.

Scribbller
12-28-2006, 08:04 AM
I cant seem to get this to work, when I ran it I got this sql error on cmps
Database error in vBulletin 3.6.2:

Invalid SQL:
SELECT g.threadid,g.header_image image, p.title, g.byline, IF(g.synopsis, g.synopsis, p.pagetext) synopsis ,g.pagecount, g.custom2 1 FROM
vb3_gars g
INNER JOIN vb3_gars_custom_values gsv ON gcv.custom_threadid = g.threadid
INNER JOIN vb3_thread t ON g.threadid = t.threadid
INNER JOIN vb3_post p ON t.firstpostid = p.postid
WHERE t.visible = 1 AND t.open != 10
AND t.forumid in (1)

ORDER BY RAND() LIMIT 3;

MySQL Error : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '1 FROM
vb3_gars g
INNER JOIN vb3_gars_
Error Number : 1064
Date : Tuesday, December 12th 2006 @ 12:48:42 PM
Script : http://www.nauman.info/cmps_index.php
Referrer :
IP Address : xxx.xx.xxx.xx
Username : Nauman
Classname : vb_database

Secondly is it possible to run this outside of hell module?

The Geek
12-28-2006, 09:24 AM
hmmm... looks like a bug. Edit the gars.php module and change:

",g.pagecount, g.custom2 $customfields FROM

to

",g.pagecount, g.custom2 FROM

As for the hell module, I dont see why not - but Ive never tried it

Tigratrus
01-01-2007, 02:49 AM
Happy New Year! I know you're taking some time off, but maybe someone can help? I'm having the same problem as this bloke back in July


For some reason, my mod isnt pulling in any images or text.
The mod table is there and ready to go, but no content. I checked my settings to make sure I have the right forum id and have already gone over everything else thrice! Any suggestions?

Only I've gone over it 12 times and nothing. Anyone have any suggestions? I could swear I had this working before, but now, nada!

Any help appreciated. Thanks!

Susan and James

The Geek
01-02-2007, 08:42 AM
Can you post your settings?

Tigratrus
01-02-2007, 03:11 PM
Rather than taking a stab at which settings you want to see, if you don't mind I'll PM you a login to the admincp so you can check it all out. If this doesn't work for you, just let me know and I'll get you whatever info you desire. Happy New Year!

Susan and James

Scribbller
01-03-2007, 06:09 AM
A question, how do I display username and custome profile fields on this block?

The Geek
01-03-2007, 02:40 PM
admincp wont give access as the settings are embedded in the gars.php module. Youll need to crack that open to see the settings.

To get user info, you would need to change the sql query to grab the fields you want and then to join the user and userprofile tables.

HTHs

Tigratrus
01-03-2007, 03:18 PM
<?php

//SETTINGS

$forumids = "68"; // Comma seperated list of forumids
$limit = 5; // How many items to show
$title = "Store Info"; // Module Title
$featured = 0; // 1= Only featured items
$url_to_default_image = "types/3/default.jpg"; //Relative URL to default image from geek/gars/images/ folder
$vertical = 1; // 1= Vertical (only for template 1 or 3)
$preview = 1; // 1= Show preview
$ratings = 1; // 1=show ratings
$template = 3; // 1=simple with pic, 2=big with pic, 3=Listing no pic
$order = 1; // 0 = rand, 1=desc, 2=asc
$maxchars = 500; // Maximum amount of chards to snip
$customfields = false; // Set to true to grab the custom fields.
// END SETTINGS

switch ($order)
{
case 0:
$order = "RAND()"; break;
case 1:
$order = "g.threadid DESC"; break;
default:
$order = "g.threadid ASC";
}
if (!$limit)
{
$limit = "1";
}


$sql = "SELECT g.threadid,g.header_image image, p.title, g.byline" .
($preview ? ", IF(g.synopsis, g.synopsis, p.pagetext) synopsis " : "") .
($ratings ? ",round((g.overall_rating/10),0) author_rating, g.overall_rating author_rating_percent,round((g.avg_rating/10),0) member_rating, g.avg_rating member_rating_percent " : "" ) .
",g.pagecount, g.custom2 $customfields FROM
" . TABLE_PREFIX . "gars g
" . ($customfields ? " INNER JOIN " . TABLE_PREFIX . "gars_custom_values gsv ON gcv.custom_threadid = g.threadid " : "") . "
INNER JOIN " . TABLE_PREFIX . "thread t ON g.threadid = t.threadid
INNER JOIN " . TABLE_PREFIX . "post p ON t.firstpostid = p.postid
WHERE t.visible = 1 AND t.open != 10
" . ($forumids ? " AND t.forumid in ($forumids) " : "" ) . "
" . ($featured ? " AND g.feature_untill> " . TIMENOW : "") . "
ORDER BY $order LIMIT $limit";

$results = $db->query_read($sql);
$modulehtml = "";
$x = 0;
$bburl = $vbulletin->options['bburl'];
if ($template==2)
{
$vertical = 1;
}
while ($result = $db->fetch_array($results))
{

if (!$result['image'])
{
$result['image'] = $vbulletin->options['bburl'] . "/geek/gars/images/" . $url_to_default_image;
}
elseif (substr($result['image'], 0, 1) == ".")
{
$result['image'] = $vbulletin->options['bburl'] . substr($result['image'], 1);
}
else
{
$result['image'] = $vbulletin->options['bburl'] . $result['image'];
}

if ($parsebb && $template!=3)
{
$result['message'] = $bbcode_parser->do_parse($result['synopsis'], 0, 1, 1, 1);
}
else
{
$result['message'] = strip_bbcode($result['synopsis']);
}

if (strlen($result['message']) > $maxchars)
{
$result['message'] = substr($result['message'], 0, strrpos(substr($result['message'], 0, $maxchars), ' ')) . '...' . ($template!=3 ? construct_phrase($vbphrase['read_more'], $vbulletin->options['bburl'], $result['threadid'], $session['sessionurl']) : "");
}
eval('$bits = "' . fetch_template('adv_portal_gars_bit' . $template) . '";');
if ($vertical)
{
$modulehtml .= "<tr>$bits</tr>";
}
else
{
$modulehtml .= $bits;
$x++;
}

}
if ($modulehtml)
{
$mods['colspan'] = ($template==2 ? 3 : $x);
$mods['title'] = $title;
$mods['collapse'] = $mods['modid'];
$modcollapse = $vbcollapse["collapseobj_module_" . $mods['modid'] . ""];
$modimgcollapse = $vbcollapse["collapseimg_module_" . $mods['modid'] . ""];
if (!$vertical)
{
$modulehtml = "<tr>$modulehtml</tr>";
}
$home[$mods['modid']]['content'] .= $modulehtml;
}


?>

spiceman
01-03-2007, 06:11 PM
How about modifying this hack for custom VB pages so we can treat it as a PLUGIN?

Scribbller
01-04-2007, 06:35 AM
<?php

//SETTINGS

$forumids = "68"; // Comma seperated list of forumids
$limit = 5; // How many items to show
$title = "Store Info"; // Module Title
$featured = 0; // 1= Only featured items
$url_to_default_image = "types/3/default.jpg"; //Relative URL to default image from geek/gars/images/ folder
$vertical = 1; // 1= Vertical (only for template 1 or 3)
$preview = 1; // 1= Show preview
$ratings = 1; // 1=show ratings
$template = 3; // 1=simple with pic, 2=big with pic, 3=Listing no pic
$order = 1; // 0 = rand, 1=desc, 2=asc
$maxchars = 500; // Maximum amount of chards to snip
$customfields = false; // Set to true to grab the custom fields.
// END SETTINGS

switch ($order)
{
case 0:
$order = "RAND()"; break;
case 1:
$order = "g.threadid DESC"; break;
default:
$order = "g.threadid ASC";
}
if (!$limit)
{
$limit = "1";
}


$sql = "SELECT g.threadid,g.header_image image, p.title, g.byline" .
($preview ? ", IF(g.synopsis, g.synopsis, p.pagetext) synopsis " : "") .
($ratings ? ",round((g.overall_rating/10),0) author_rating, g.overall_rating author_rating_percent,round((g.avg_rating/10),0) member_rating, g.avg_rating member_rating_percent " : "" ) .
",g.pagecount, g.custom2 $customfields FROM
" . TABLE_PREFIX . "gars g
" . ($customfields ? " INNER JOIN " . TABLE_PREFIX . "gars_custom_values gsv ON gcv.custom_threadid = g.threadid " : "") . "
INNER JOIN " . TABLE_PREFIX . "thread t ON g.threadid = t.threadid
INNER JOIN " . TABLE_PREFIX . "post p ON t.firstpostid = p.postid
WHERE t.visible = 1 AND t.open != 10
" . ($forumids ? " AND t.forumid in ($forumids) " : "" ) . "
" . ($featured ? " AND g.feature_untill> " . TIMENOW : "") . "
ORDER BY $order LIMIT $limit";

$results = $db->query_read($sql);
$modulehtml = "";
$x = 0;
$bburl = $vbulletin->options['bburl'];
if ($template==2)
{
$vertical = 1;
}
while ($result = $db->fetch_array($results))
{

if (!$result['image'])
{
$result['image'] = $vbulletin->options['bburl'] . "/geek/gars/images/" . $url_to_default_image;
}
elseif (substr($result['image'], 0, 1) == ".")
{
$result['image'] = $vbulletin->options['bburl'] . substr($result['image'], 1);
}
else
{
$result['image'] = $vbulletin->options['bburl'] . $result['image'];
}

if ($parsebb && $template!=3)
{
$result['message'] = $bbcode_parser->do_parse($result['synopsis'], 0, 1, 1, 1);
}
else
{
$result['message'] = strip_bbcode($result['synopsis']);
}

if (strlen($result['message']) > $maxchars)
{
$result['message'] = substr($result['message'], 0, strrpos(substr($result['message'], 0, $maxchars), ' ')) . '...' . ($template!=3 ? construct_phrase($vbphrase['read_more'], $vbulletin->options['bburl'], $result['threadid'], $session['sessionurl']) : "");
}
eval('$bits = "' . fetch_template('adv_portal_gars_bit' . $template) . '";');
if ($vertical)
{
$modulehtml .= "<tr>$bits</tr>";
}
else
{
$modulehtml .= $bits;
$x++;
}

}
if ($modulehtml)
{
$mods['colspan'] = ($template==2 ? 3 : $x);
$mods['title'] = $title;
$mods['collapse'] = $mods['modid'];
$modcollapse = $vbcollapse["collapseobj_module_" . $mods['modid'] . ""];
$modimgcollapse = $vbcollapse["collapseimg_module_" . $mods['modid'] . ""];
if (!$vertical)
{
$modulehtml = "<tr>$modulehtml</tr>";
}
$home[$mods['modid']]['content'] .= $modulehtml;
}


?>

Is that the answer to my querry or yours?

The Geek
01-04-2007, 10:03 AM
Tig - check this setting:

$template = 3;

That is set to show no pic. (check the comments next to the setting)

Spice - not sure what you mean exactly. This is specific to vbacmps and gars.

Scribbller
01-04-2007, 11:06 AM
Geek can you please modift the querry given in gars.php file so that it can also import comment count (reply count), username and custom fields (in my case I want to display a custom field named gars3). It would be really appreciated.

The Geek
01-04-2007, 11:27 AM
ill put it on my list to look into.

spiceman
01-04-2007, 03:09 PM
Well... I dont' have vbacmps.... but i have created custom pages that use VB's backend and tables... which allows me to display templates/plugins etc. on my custom pages... (novice php hacker)

So i would luv to call this hack as a plugin into my custom page... any suggestions?

Tig - check this setting:


Spice - not sure what you mean exactly. This is specific to vbacmps and gars.


EDIT:::: Actually... no worries... code was simple enough to read an implement onto my custom page... thx

Tigratrus
01-04-2007, 06:14 PM
Scribbler - Sorry, that was my response to Geek on the request for settings. I'm not much good for answers...:rolleyes:

Susan

Scribbller
01-05-2007, 11:32 AM
Scribbler - Sorry, that was my response to Geek on the request for settings. I'm not much good for answers...:rolleyes:

Susan
and here I thought I saw a ray of light :P

Scribbller
01-10-2007, 06:51 AM
Mr. Geek have you had a chance to look into this?

The Geek
01-10-2007, 08:30 AM
Sorry Scribbler, I havent yet.

zkilzz
01-17-2007, 07:24 AM
If i want to have the synopsis in the listing what should i ad to the gars.php so the $synopsis works the right way?

The Geek
01-17-2007, 09:31 AM
I am pretty sure that there is an option for the synopsis already in there? However Im traveling right now so I cant crack open the code to see.

zkilzz
01-17-2007, 11:58 AM
I am pretty sure that there is an option for the synopsis already in there? However Im traveling right now so I cant crack open the code to see.

I'm using $result[synopsis] but its not showing the synopsis but the message.

Looks like this.

http://www.bilforumet.net/images/bfscreen.jpg

Here is the code i use for gars.php

<?php

//SETTINGS

$forumids = "1136"; // Comma seperated list of forumids
$limit = 3; // How many items to show
$title = "Nyheter"; // Module Title
$featured = 0; // 1= Only featured items
$url_to_default_image = "types/3/default.jpg"; //Relative URL to default image from geek/gars/images/ folder
$vertical = 0; // 1= Vertical (only for template 1 or 3)
$preview = 1; // 1= Show preview
$ratings = 1; // 1=show ratings
$template = 2; // 1=simple with pic, 2=big with pic, 3=Listing no pic
$order = 0; // 0 = rand, 1=desc, 2=asc
$maxchars = 70; // Maximum amount of chards to snip
$customfields = false; // Set to true to grab the custom fields.
// END SETTINGS

switch ($order)
{
case 0:
$order = "RAND()"; break;
case 1:
$order = "g.threadid DESC"; break;
default:
$order = "g.threadid ASC";
}
if (!$limit)
{
$limit = "1";
}


$sql = "SELECT g.threadid,g.header_image image, p.title, g.byline" .
($preview ? ", IF(g.synopsis, g.synopsis, p.pagetext) synopsis " : "") .
($ratings ? ",round((g.overall_rating/10),0) author_rating, g.overall_rating author_rating_percent,round((g.avg_rating/10),0) member_rating, g.avg_rating member_rating_percent " : "" ) .
",g.pagecount, g.custom2 $customfields FROM
" . TABLE_PREFIX . "gars g
" . ($customfields ? " INNER JOIN " . TABLE_PREFIX . "gars_custom_values gsv ON gcv.custom_threadid = g.threadid " : "") . "
INNER JOIN " . TABLE_PREFIX . "thread t ON g.threadid = t.threadid
INNER JOIN " . TABLE_PREFIX . "post p ON t.firstpostid = p.postid
WHERE t.visible = 1 AND t.open != 10
" . ($forumids ? " AND t.forumid in ($forumids) " : "" ) . "
" . ($featured ? " AND g.feature_untill> " . TIMENOW : "") . "
ORDER BY $order LIMIT $limit";

$results = $db->query_read($sql);
$modulehtml = "";
$x = 0;
$bburl = $vbulletin->options['bburl'];
if ($template==2)
{
$vertical = 0;
}
while ($result = $db->fetch_array($results))
{

if (!$result['image'])
{
$result['image'] = $vbulletin->options['bburl'] . "/geek/gars/images/" . $url_to_default_image;
}
elseif (substr($result['image'], 0, 1) == ".")
{
$result['image'] = $vbulletin->options['bburl'] . substr($result['image'], 1);
}
else
{
$result['image'] = $vbulletin->options['bburl'] . $result['image'];
}

if ($parsebb && $template!=3)
{
$result['message'] = $bbcode_parser->do_parse($result['synopsis'], 0, 1, 1, 1);
}
else
{
$result['message'] = strip_bbcode($result['synopsis']);
}

if (strlen($result['message']) > $maxchars)
{
$result['message'] = substr($result['message'], 0, strrpos(substr($result['message'], 0, $maxchars), ' ')) . '...' . ($template!=3 ? construct_phrase($vbphrase['read_more'], $vbulletin->options['bburl'], $result['threadid'], $session['sessionurl']) : "");
}
eval('$bits = "' . fetch_template('adv_portal_gars_bit' . $template) . '";');
if ($vertical)
{
$modulehtml .= "<tr>$bits</tr>";
}
else
{
$modulehtml .= $bits;
$x++;
}

}
if ($modulehtml)
{
$mods['colspan'] = ($template==2 ? 3 : $x);
$mods['title'] = $title;
$mods['collapse'] = $mods['modid'];
$modcollapse = $vbcollapse["collapseobj_module_" . $mods['modid'] . ""];
$modimgcollapse = $vbcollapse["collapseimg_module_" . $mods['modid'] . ""];
if (!$vertical)
{
$modulehtml = "<tr>$modulehtml</tr>";
}
$home[$mods['modid']]['content'] .= $modulehtml;
}


?>

The Geek
01-20-2007, 03:10 PM
THe synopsis should be in $result[message]

HTHs

zkilzz
01-21-2007, 05:02 PM
THe synopsis should be in $result[message]

HTHs

Sorry! That gives the message! Not the synopsis.

The Geek
01-21-2007, 08:16 PM
But that should contain the synopsis text UNLESS there is no synopsis there. Then it will show a preview.

zkilzz
01-22-2007, 06:29 AM
Check this out.

http://www.bilforumet.net/images/bfscreen.jpg


and


http://www.bilforumet.net/images/bfscreen2.jpg

techenigma
01-26-2007, 05:50 PM
For some reason when I use template 2 - the big with image everything displays properly but the background is black. It doesn't do that in template 1 or 3 only in 2. How to fix this?

I tried eyeballing the template but I dont see anything that would make it do that...

edit: figured out its a CSS setting in vbulletin doing it. The table background one to be exact. How can I over-ride it for just that page? I can't change it because if I do it throws off my entire theme.

The Geek
01-29-2007, 04:27 PM
Have you tried this post? http://www.thevbgeek.com/showpost.php?p=11792&postcount=124

Marius
01-31-2007, 04:19 PM
i get the followin ero help me please

Invalid SQL:
SELECT g.threadid,g.header_image image, p.title, g.byline, IF(g.synopsis, g.synopsis, p.pagetext) synopsis ,round((g.overall_rating/10),0) author_rating, g.overall_rating author_rating_percent,round((g.avg_rating/10),0) member_rating, g.avg_rating member_rating_percent ,g.pagecount, g.custom2 1 FROM
gars g
INNER JOIN gars_custom_values gsv ON gcv.custom_threadid = g.threadid
INNER JOIN thread t ON g.threadid = t.threadid
INNER JOIN post p ON t.firstpostid = p.postid
WHERE t.visible = 1 AND t.open != 10
AND t.forumid in (36,79,55,21,39,40,78,80,193,80,54)
AND g.feature_untill> 1170263796
ORDER BY RAND() LIMIT 5;

The Geek
02-01-2007, 03:57 PM
Try this post:

http://www.thevbgeek.com/showpost.php?p=15287&postcount=200

HTHs

FRAiD
02-14-2007, 02:29 AM
Does this work like a recent threads sort of module, except it's more like recent reviews?

And does it work in 3.6x?

The Geek
02-15-2007, 03:17 PM
Yes on both counts :)

pkallberg21
02-25-2007, 11:47 AM
Hey! Really nice module, but unfortunatly it is not working for me :(
I cannot get it to appear on my vbAdvanced page, although it is active and I have followed all the instructions in the readme file. What could I do to fix this?

Thanks.

The Geek
02-28-2007, 06:17 PM
can you post your settings?

kevnj
03-02-2007, 02:25 AM
which setting would you like posted geek cause im having the same problem.


can someone post there modules to make this easier

The Geek
03-02-2007, 10:35 AM
The top portion of the file with the settings in it would be cool.

kevnj
03-02-2007, 02:24 PM
heres what i got.

adv_portal_gars_bit1

<if condition="$vertical"><tr></if><td class="alt2" align="center">
<a href="$bburl/showthread.php?t=$result[threadid]" title="$result[title]">
<img alt="$result[title]" src="$result[image]" style="border: 2px #000000;padding:2px;" /><br />
<strong>$result[title]</strong></a><div class="smallfont">$result[byline]</div>
</td>
<if condition="$vertical"></tr></if>



adv_portal_gars_bit2

<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<table border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
<td width="27"><a href="$bburl/showthread.php?$session[sessionurl]t=$result[threadid]"><img src="$result[image]" border="0" style="border: 1px #000000;padding:2px;" alt="$result[title]" /></a></td>
</tr>
</table><span class="smallfont">
<a href="$bburl/showthread.php?$session[sessionurl]t=$result[threadid]"><strong>$result[title]</strong></a></span>
<if condition="$result[byline]">
<div class="smallfont">$result[byline]</div>
</if>
<if condition="$result['message']">
<div class="smallfont">
$result[message]</div>
</if> </div>

<tr> <if condition="$result['author_rating']">
<td class="alt1" style="white-space:nowrap;" <if condition="!$result['member_rating']">colspan="2"</if>>

<span class="smallfont">Author rating</span>
</td></if>
<if condition="$result['member_rating']">
<td class="alt1" style="white-space:nowrap;" <if condition="!$result['author_rating']">colspan="2"</if>>
<span class="smallfont">Member rating</span>
</if>
</td>
</tr>


<tr> <if condition="$result['author_rating']">
<td class="alt1" style="white-space:nowrap;" <if condition="!$result['member_rating']">colspan="2"</if>>
<img class="inlineimg" src="$stylevar[imgdir_rating]/gars_$result[author_rating].gif" border="0" alt="Author rating: $result[author_rating_percent]%" /></td></if>
<if condition="$result['member_rating']">
<td class="alt1" style="white-space:nowrap;" <if condition="!$result['author_rating']">colspan="2"</if>>
<img class="inlineimg" src="$stylevar[imgdir_rating]/gars_$result[member_rating].gif" border="0" alt="Member rating: $result[member_rating_percent]%" />
</td></if></tr>

</table>
</td>

adv_portal_gars_bit3

<td class="alt2" align="$stylevar[left]">
<a href="$bburl/showthread.php?t=$result[threadid]" title="$result[message]">
<strong>$result[title]</strong></a><if condition="$result['byline']"><div class="smallfont">$result[byline]</div></if>
</td>



Heres my gars.php file

<?php

//SETTINGS

$forumids = "43"; // Comma seperated list of forumids
$limit = 1; // How many items to show
$title = "Random Review"; // Module Title
$featured = 0; // 1= Only featured items
$url_to_default_image = "types/3/default.jpg"; //Relative URL to default image from geek/gars/images/ folder
$vertical = 1; // 1= Vertical (only for template 1 or 3)
$preview = 1; // 1= Show preview
$ratings = 1; // 1=show ratings
$template = 2; // 1=simple with pic, 2=big with pic, 3=Listing no pic
$order = 0; // 0 = rand, 1=desc, 2=asc
$maxchars = 150; // Maximum amount of chards to snip
$customfields = false; // Set to true to grab the custom fields.
// END SETTINGS

switch ($order)
{
case 0:
$order = "RAND()"; break;
case 1:
$order = "g.threadid DESC"; break;
default:
$order = "g.threadid ASC";
}
if (!$limit)
{
$limit = "1";
}


$sql = "SELECT g.threadid,g.header_image image, p.title, g.byline" .
($preview ? ", IF(g.synopsis, g.synopsis, p.pagetext) synopsis " : "") .
($ratings ? ",round((g.overall_rating/10),0) author_rating, g.overall_rating author_rating_percent,round((g.avg_rating/10),0) member_rating, g.avg_rating member_rating_percent " : "" ) .
",g.pagecount, g.custom2 $customfields FROM
" . TABLE_PREFIX . "gars g
" . ($customfields ? " INNER JOIN " . TABLE_PREFIX . "gars_custom_values gsv ON gcv.custom_threadid = g.threadid " : "") . "
INNER JOIN " . TABLE_PREFIX . "thread t ON g.threadid = t.threadid
INNER JOIN " . TABLE_PREFIX . "post p ON t.firstpostid = p.postid
WHERE t.visible = 1 AND t.open != 10
" . ($forumids ? " AND t.forumid in ($forumids) " : "" ) . "
" . ($featured ? " AND g.feature_untill> " . TIMENOW : "") . "
ORDER BY $order LIMIT $limit";

$results = $db->query_read($sql);
$modulehtml = "";
$x = 0;
$bburl = $vbulletin->options['bburl'];
if ($template==2)
{
$vertical = 1;
}
while ($result = $db->fetch_array($results))
{

if (!$result['image'])
{
$result['image'] = $vbulletin->options['bburl'] . "/geek/gars/images/" . $url_to_default_image;
}
elseif (substr($result['image'], 0, 1) == ".")
{
$result['image'] = $vbulletin->options['bburl'] . substr($result['image'], 1);
}
else
{
$result['image'] = $vbulletin->options['bburl'] . $result['image'];
}

if ($parsebb && $template!=3)
{
$result['message'] = $bbcode_parser->do_parse($result['synopsis'], 0, 1, 1, 1);
}
else
{
$result['message'] = strip_bbcode($result['synopsis']);
}

if (strlen($result['message']) > $maxchars)
{
$result['message'] = substr($result['message'], 0, strrpos(substr($result['message'], 0, $maxchars), ' ')) . '...' . ($template!=3 ? construct_phrase($vbphrase['read_more'], $vbulletin->options['bburl'], $result['threadid'], $session['sessionurl']) : "");
}
eval('$bits = "' . fetch_template('adv_portal_gars_bit' . $template) . '";');
if ($vertical)
{
$modulehtml .= "<tr>$bits</tr>";
}
else
{
$modulehtml .= $bits;
$x++;
}

}
if ($modulehtml)
{
$mods['colspan'] = ($template==2 ? 3 : $x);
$mods['title'] = $title;
$mods['collapse'] = $mods['modid'];
$modcollapse = $vbcollapse["collapseobj_module_" . $mods['modid'] . ""];
$modimgcollapse = $vbcollapse["collapseimg_module_" . $mods['modid'] . ""];
if (!$vertical)
{
$modulehtml = "<tr>$modulehtml</tr>";
}
$home[$mods['modid']]['content'] .= $modulehtml;
}


?>



I ran it on vb3.6.1 yesterday but had the problem of it not showing on vbadvanced cmps 2.2.1 so i upgraded to the latest vb of 3.6.5 with still the same problem. Not sure which version of GARS im running as I have the branding free option and I installed it some time ago.



Can someone upload module(s) they have ?

The Geek
03-04-2007, 12:12 PM
It doesnt look like you edited your settings. You need to change the $forumids in the settings to point to your forums to pull from.

The Geek
03-04-2007, 12:12 PM
as an FYI - I have updated the package to fix the custom fields not being pulled and to update the adv_portal_gars2 template.

nJoy

gqueipo
03-04-2007, 02:47 PM
Hello,

I'm using RSS feed, but the information is not displayed in this block automaticly,only it is displayed if I go to the article, then click edit, and finally click in "save changes"

The feed is working fine, it gets the information, the same with GARS when you visit the article, but it is not displayed in CMPS block if I dont edit manually the article. I'm using template 2.

Any ideas??

The Geek
03-04-2007, 04:30 PM
yea, the problem is that your RSS feed is creating a thread, but no GARS db entry point (that happens when you click edit->save).
You will most likely need to modify the RSS feed or have a hook that will generate an entry point into GARS.

HTHs

gqueipo
03-04-2007, 10:12 PM
yea, the problem is that your RSS feed is creating a thread, but no GARS db entry point (that happens when you click edit->save).
You will most likely need to modify the RSS feed or have a hook that will generate an entry point into GARS.

HTHs

Thanks Geek, how/where I can modify RSS or get a hook to generate the entry point you mention?

The Geek
03-04-2007, 11:14 PM
TBH I have no clue. Check the hack you are using or the RSS hooks in vB.

Let us know how you get on with it

kevnj
03-05-2007, 01:04 PM
Anyone get the new download to work ? Im still having the same problem. Ive updated by gars.php like this:

<?php

//SETTINGS

$forumids = "62,65,67"; // Comma seperated list of forumids
$limit = 3; // How many items to show
$title = "Random Review"; // Module Title
$featured = 0; // 1= Only featured items
$url_to_default_image = "types/3/default.jpg"; //Relative URL to default image from geek/gars/images/ folder
$vertical = 1; // 1= Vertical (only for template 1 or 3)
$preview = 1; // 1= Show preview
$ratings = 0; // 1=show ratings
$template = 1; // 1=simple with pic, 2=big with pic, 3=Listing no pic
$order = 0; // 0 = rand, 1=desc, 2=asc
$maxchars = 150; // Maximum amount of chards to snip
$customfields = "gars1"; // comma seperated list of custom field ids to fetch too (i.e. gars1,gars4)
// END SETTINGS

switch ($order)
{

:confused:

The Geek
03-05-2007, 04:08 PM
did you also update the templates in the readme?

kevnj
03-06-2007, 11:56 AM
did you also update the templates in the readme?

yea updated those and the gars.php that i missed the first time around i updated to pull the correct fields. should i open a support ticket for you to look at ?

The Geek
03-07-2007, 11:07 AM
No, the support ticket system is for the core products. This is an unsupported add on.

Can you try a different template setting (i.e. $template = 2;)
Also, can you change $customfields to $customfields = ""; just to see if there is a problem at that end.

HTHs

kevnj
03-07-2007, 11:57 AM
No, the support ticket system is for the core products. This is an unsupported add on.

Can you try a different template setting (i.e. $template = 2;)
Also, can you change $customfields to $customfields = ""; just to see if there is a problem at that end.

HTHs

Tried that. and nope. still nothing... changed the $template to both 1,2,3, after changing the customfields part and nada :(

anyone else having this problem?

The Geek
03-07-2007, 12:51 PM
REally stupid question - but you have created the module in vba and it is active?

kevnj
03-07-2007, 01:49 PM
REally stupid question - but you have created the module in vba and it is active?

yup... named it "reviews"

theres no place to make a review a featured thread to show in the module right ? kinda like the "news" in vbcmps

htthttp://www.jerseyparties.com/images/gars1.jpg
http://www.jerseyparties.com/images/gars2.jpg

The Geek
03-07-2007, 03:14 PM
that all looks right to me. PM me ftp and admincp details and ill look into it

kevnj
03-07-2007, 06:12 PM
pm sent. thanks for looking into this.