vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   vBulletin CMS Widgets - [WIDGET] Slider (https://vborg.vbsupport.ru/showthread.php?t=233909)

cory_booth 01-22-2010 10:00 PM

[WIDGET] Slider
 
1 Attachment(s)
Widget Slider - Frontpage Slide Show.

Demo: http://demo.webdeveloperplus.com/fea...ontent-slider/

This is based on the demo above. OK this is my first mod and I know the coding really sucks! But I thought I would get this out and see if anyone want to improve on it.
This is one of those frontpage slide shows that pulls your attachment and data from specified forums.

I hope this works for you.

Install:

Edit slider.php and at line 100:

$forumid - set the forum to pull slides
$limit - set the number of posts
$chars - set the total number of characters
$words - set total number of words

Upload Files.

Create PHP Widget and inser the following code:

ob_start();
echo '<div>';
echo '<center>';
require_once './clientscript/slider/slider.php';
echo '</center>';
echo '</div>';
$output=ob_get_contents();
ob_end_clean();

cory_booth 01-22-2010 11:49 PM

NOTE: This mod uses the jquery javascript so if you load it already for other plugins (i.e. cometchat) then look to see if you need to load it with the script.

mandingo 01-22-2010 11:59 PM

Looks promising.Any way to get this to work on the forum front page?

ManagerJosh 01-23-2010 12:24 AM

I'm seeing this tagged a CMS widget, so exactly what are we pulling from a forum when we have no original forum post with attachments per-se for our CMS articles?

cory_booth 01-23-2010 12:43 AM

Quote:

Originally Posted by mandingo (Post 1963931)
Looks promising.Any way to get this to work on the forum front page?

Perhaps, however I am still learning.
I need to template a bunch of this stuff and then do a hook.
I'd like to make it a plugin so you don't have to edit the php.

This is all stuff I will try to do...

cory_booth 01-23-2010 12:44 AM

Quote:

Originally Posted by ManagerJosh (Post 1963950)
I'm seeing this tagged a CMS widget, so exactly what are we pulling from a forum when we have no original forum post with attachments per-se for our CMS articles?

I guess I see your point, but for me... My Articles start off as forum posts in the "Current Events" forum. Then I Post as Article...

I guess some people don't use stuff this way so, perhaps this isn't a good idea for your site.

mandingo 01-23-2010 12:53 AM

Quote:

Originally Posted by cory_booth (Post 1963966)
Perhaps, however I am still learning.
I need to template a bunch of this stuff and then do a hook.
I'd like to make it a plugin so you don't have to edit the php.

This is all stuff I will try to do...

I'll keep watch.if I can think of any way to help i'll send ideas your way but i'm not a big coder either.

winstone 01-23-2010 12:54 AM

if you ever decide to do it using YUI, see this example http://www.lutsr.nl/yui/image%20slideshow/

you will need to change a fair bit of stuff tho

valendono 01-23-2010 01:02 AM

any forum example ?

pablete 01-23-2010 01:06 AM

Good mod but i have a problem with....

Not show the images from post in features and

My forum is on folder /forum, if you put on a title of one those post featured show me an error, because the links put http://web.com/showthread.php?t=323 an not http://web.com/forum/showthread.php?t=323...

Why can i fixed?

Thank's

Sleeter 01-23-2010 06:05 AM

Slideshow is working but images are causing all kinds of strange display (breaking out of the frame). Needs to be able to auto re-size images or only show portions of images and fill the entire frame. Cool start though. I am desperate for a slideshow like this.

Any idea how could I go about getting rid of the small preview images section completely?

sean-zigster 01-23-2010 06:32 AM

Could we not have this showing certain albums or is there another mod out there that doe this ?

fourat 01-23-2010 01:06 PM

thank you so much

ywwz 01-23-2010 01:06 PM

Such a good idea.

Datenpapst 01-23-2010 02:00 PM

actually i am just using your widget code, because already got a working slideshow software, but when i use it, somehow the forum goes to the left and the size of the font becomes smaller. Maybe some tags not closed or something missing?

dacho 01-23-2010 02:26 PM

we can use it also on the CMS with CMS content ?

cory_booth 01-23-2010 02:45 PM

Quote:

Originally Posted by valendono (Post 1963982)
any forum example ?

Sorry, this was for the CMS and I certainly have a long way to go before it is ready to template and use hooks to place in the forum home.

Quote:

Originally Posted by pablete (Post 1963990)
Good mod but i have a problem with....

Not show the images from post in features and

My forum is on folder /forum, if you put on a title of one those post featured show me an error, because the links put http://web.com/showthread.php?t=323 an not http://web.com/forum/showthread.php?t=323...

Why can i fixed?

Thank's

Opps... Yep this is why I put this out here for the pros... The code is set for no /forum/

So to fix, check slider.php

Find these two lines:
PHP Code:

$link "../showthread.php?t=".$threadid."";
$imagepath "../attachment.php?attachmentid=".$pic['attach'];

and 
make
$link "../forum/showthread.php?t=".$threadid."";
$imagepath "../forum/attachment.php?attachmentid=".$pic['attach']; 

You may need to adjust this line:
PHP Code:

require_once('./includes/class_bbcode.php'); 

as well

Quote:

Originally Posted by Sleeter (Post 1964104)
Slideshow is working but images are causing all kinds of strange display (breaking out of the frame). Needs to be able to auto re-size images or only show portions of images and fill the entire frame. Cool start though. I am desperate for a slideshow like this.

Any idea how could I go about getting rid of the small preview images section completely?

1. Images, yeah I make sure my event posts have 400px or less... I'll have to investigate resizing...

2. Drop the tabs... Hmmm, try this: near the bottom of slider.php.
between tabhtml and centerhtml add

tabhtml ='';

Quote:

Originally Posted by Datenpapst (Post 1964361)
actually i am just using your widget code, because already got a working slideshow software, but when i use it, somehow the forum goes to the left and the size of the font becomes smaller. Maybe some tags not closed or something missing?


So you mean you are pulling in another .php file? Hmmm... No I have one div and one center and both are closed at the end.
You could simply drop the div and center statements and see if that helps?

Quote:

Originally Posted by dacho (Post 1964395)
we can use it also on the CMS with CMS content ?

That'd be great, but not right now...
It pulls from a forum and not the CMS.




NOTE:
Folks thanks for the feedback and I am truly sorry if this is a struggle. Again, I had this and other ideas of mine posted in the Programming section here but I got no feed back... So I posted this here to see what people thought.

I will do my very best to get this thing up to snuff, but this is also tagged as a free project so if someone else is faster at this than me - go for it...

cory_booth 01-23-2010 02:48 PM

Quote:

Originally Posted by Datenpapst (Post 1964361)
actually i am just using your widget code, because already got a working slideshow software, but when i use it, somehow the forum goes to the left and the size of the font becomes smaller. Maybe some tags not closed or something missing?

Ah... Are you pulling in any portion of the php file?
I have a lot of CSS in there - perhaps that is the issue?

Sleeter 01-24-2010 03:50 AM

First of all thank you so much for putting this out. I've been working with it for a day now and have got it to a point where I can implement on my site. Graphically it is fantastic! Just what I was looking for. Had to make several adjustments to the PHP and CSS but nothing to difficult.

The way I have implemented this is to set up a private forum. When I get some good content (with nice photos) I copy the posts to the private forum. I then crop the photo to 650x320 and re-attach. The only problem I still have is the links from the thread title in the slideshow to the thread it came from. I want to remove that link completely since members will not be able to see the private forum. Any idea how to accomplish that?

Again, thanks so much for sharing. I had a slideshow like this on my 3.8 site and my members really missed it since upgrading to 4.0.

You can see it installed here: www.westcoasthighliners.com

I would love to get feedback.

EDIT: To drop the tabs I changed this tab items in the CSS to display: none

nomoreturn 01-24-2010 12:54 PM

1 Attachment(s)
Quote:

Originally Posted by cory_booth (Post 1964425)
Sorry, this was for the CMS and I certainly have a long way to go before it is ready to template and use hooks to place in the forum home.



Opps... Yep this is why I put this out here for the pros... The code is set for no /forum/

So to fix, check slider.php

Find these two lines:
PHP Code:

$link "../showthread.php?t=".$threadid."";
$imagepath "../attachment.php?attachmentid=".$pic['attach'];

and 
make
$link "../forum/showthread.php?t=".$threadid."";
$imagepath "../forum/attachment.php?attachmentid=".$pic['attach']; 

You may need to adjust this line:
PHP Code:

require_once('./includes/class_bbcode.php'); 

as well



1. Images, yeah I make sure my event posts have 400px or less... I'll have to investigate resizing...

2. Drop the tabs... Hmmm, try this: near the bottom of slider.php.
between tabhtml and centerhtml add

tabhtml ='';




So you mean you are pulling in another .php file? Hmmm... No I have one div and one center and both are closed at the end.
You could simply drop the div and center statements and see if that helps?


That'd be great, but not right now...
It pulls from a forum and not the CMS.




NOTE:
Folks thanks for the feedback and I am truly sorry if this is a struggle. Again, I had this and other ideas of mine posted in the Programming section here but I got no feed back... So I posted this here to see what people thought.

I will do my very best to get this thing up to snuff, but this is also tagged as a free project so if someone else is faster at this than me - go for it...

1st of all thanks for giving us such a nice mod i installed and my images are not showed up so i did this as you told and still images not showing please help me to fix this thanks

cory_booth 01-25-2010 11:28 PM

Quote:

Originally Posted by Sleeter (Post 1964934)
The only problem I still have is the links from the thread title in the slideshow to the thread it came from. I want to remove that link completely since members will not be able to see the private forum. Any idea how to accomplish that?

Thanks for the compliment and I am sorry you had to spend a day messing around :-)

OK, so for the link:
In the slider.php find this line:
PHP Code:

$centerhtml .="<h2><a href='".$link."'>".$titleContent."</a></h2>"

The key is the $link - you can do one or the other:

Change the line to:
PHP Code:

$centerhtml .="<h2>".$titleContent."</h2>"

To drop the link reference

or change the line to:
PHP Code:

$centerhtml .="<h2><a href='http://yourlink.com'>".$titleContent."</a></h2>"

To insert your own link to send the user

cory_booth 01-25-2010 11:39 PM

Quote:

Originally Posted by nomoreturn@hotm (Post 1965192)
1st of all thanks for giving us such a nice mod i installed and my images are not showed up so i did this as you told and still images not showing please help me to fix this thanks

Hey man... I checked your site:
www.mastdunya.com right?

Your attachment.php is at the root...

So you should drop those changes and put back to:
PHP Code:

$link "../showthread.php?t=".$threadid."";
$imagepath "../attachment.php?attachmentid=".$pic['attach']; 

Did you upload slider to the correct directory? /clientscript

murekhalir 01-26-2010 01:53 AM

Make it show articles.. instead?

cory_booth 01-27-2010 06:29 PM

Quote:

Originally Posted by murekhalir (Post 1966719)
Make it show articles.. instead?

Yeah that would be nice...
I'll look into it in the future...

Bacon Butty 01-28-2010 11:47 AM

Would be great if it could be placed on the forum home like here

murekhalir 01-30-2010 08:34 AM

There any way to just make it 100% customizable, with a click-through link?

Or does it already do that. I'll give it a try.

nomoreturn 01-30-2010 04:38 PM

Quote:

Originally Posted by cory_booth (Post 1966641)
Hey man... I checked your site:
www.mastdunya.com right?

Your attachment.php is at the root...

So you should drop those changes and put back to:
PHP Code:

$link "../showthread.php?t=".$threadid."";
$imagepath "../attachment.php?attachmentid=".$pic['attach']; 

Did you upload slider to the correct directory? /clientscript

Thanks i fix it as you mention and now its working once again thanks for wonderfull slide

Bisha 01-31-2010 09:21 PM

nice, thanks

TimberFloorAu 01-31-2010 11:15 PM

Quote:

Originally Posted by nomoreturn@hotm (Post 1970625)
Thanks i fix it as you mention and now its working once again thanks for wonderfull slide


Its not working mate

Datenpapst 02-07-2010 02:47 PM

I am using this one:
http://testforum.c-arena.com/demoslideshow.php

atm as an iframe

My code in the admincp is:

HTML Code:

ob_start();

require_once './demoslideshow.php';

$output=ob_get_contents();
ob_end_clean();

Still got the problem :(

pilotxx 02-18-2010 08:01 PM

Hii,
Great mod! any chance to add this code not as a widget? i want to add it to my forum.

ShawnV 02-19-2010 05:32 AM

Tagged, watching this one closely. Great idea!

cory_booth 02-20-2010 03:06 PM

Quote:

Originally Posted by Datenpapst (Post 1976689)
I am using this one:
http://testforum.c-arena.com/demoslideshow.php

atm as an iframe

My code in the admincp is:

HTML Code:

ob_start();

require_once './demoslideshow.php';

$output=ob_get_contents();
ob_end_clean();

Still got the problem :(

For yours, since it is a different slide show... I am not sure how it is rendered.
But I would suggest, follow very closely the code's <div> tags and make sure all <table> <tr> <td> <div> tags are open and closed properly.

Sometimes I start in the middle of the code and slowly work my way out until I spot a potential problem.

I am assuming this is the issue... Your slider has some unclosed tags...

cory_booth 02-20-2010 03:08 PM

Quote:

Originally Posted by pilotxx (Post 1985884)
Hii,
Great mod! any chance to add this code not as a widget? i want to add it to my forum.

Hmmm... To do this I would have to learn the plugin/template system. :-)

I wish I could pop this out, but I have a lot to learn in that department.

Mastergumble 02-26-2010 11:08 PM

Quote:

Originally Posted by Datenpapst (Post 1976689)
I am using this one:
http://testforum.c-arena.com/demoslideshow.php

atm as an iframe

My code in the admincp is:

HTML Code:

ob_start();

require_once './demoslideshow.php';

$output=ob_get_contents();
ob_end_clean();

Still got the problem :(

How did you fix it?

mmostafayousef 02-27-2010 09:22 AM

Quote:

Originally Posted by cory_booth (Post 1966641)
Hey man... I checked your site:
www.mastdunya.com right?

Your attachment.php is at the root...

So you should drop those changes and put back to:
PHP Code:

$link "../showthread.php?t=".$threadid."";
$imagepath "../attachment.php?attachmentid=".$pic['attach']; 

Did you upload slider to the correct directory? /clientscript

I think your lines should look like this:

PHP Code:

$link "./showthread.php?t=".$threadid."";
$imagepath "./attachment.php?attachmentid=".$pic['attach']; 


mmostafayousef 02-27-2010 09:26 AM

Quote:

Originally Posted by cory_booth (Post 1968229)
Yeah that would be nice...
I'll look into it in the future...


I suggest you use the class:

vBCms_Search_Result_Article

Located in /packages/vbcms/search/result/content.php (line 28)

Check it and reply please.

Manoel J?nior 02-27-2010 11:08 AM

I did not understand ... Where pulls the images and the textual?

cory_booth 03-05-2010 06:06 PM

Quote:

Originally Posted by Manoel J?nior (Post 1992737)
I did not understand ... Where pulls the images and the textual?

This is designed for you to select a specific forum (in the code).
This will pull the first attachment in that forum...

So the idea is you can have a forum where you make annoucements or reviews and the first post will have an image attached.

Now on your site you can have a "slider" that rotates through those images and links back to the forum posting.

its VERy rough around the edges, but functional...

CFodder 03-05-2010 07:45 PM

Hmmmm, hate to ask a stupid question but I'm getting used to it.

I've installed the mod and setup where it pulls the posts from but it's not displaying anything, no pictures or the text, just a blank widget. Have checked all the permissions etc so was wondering if there's a js script I should download for this?


All times are GMT. The time now is 06:30 PM.

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.02322 seconds
  • Memory Usage 1,875KB
  • 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
  • (3)bbcode_html_printable
  • (11)bbcode_php_printable
  • (21)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