PDA

View Full Version : Link To Us Page [DEVELOPMENT]


Pages : [1] 2

cLord
07-08-2004, 11:01 AM
*EDIT*

This hack has been released! (See attachment)

Hi,

I'm creating a "Banners/Link To Us" page for vBadvanced CMPS 1.0...
You can see the page in action here (http://www.whoox.com/index.php?page=banners).

I based the page on Pseudomizer's (http://www.vbulletin.org/forum/showthread.php?t=64615) Linkme Hack and implemented Richard's (http://www.vbadvanced.com/forum/showthread.php?t=1044) Collapsible Modules Hack.
All one has to do is upload the images to a folder and the script does the rest:
The image is displayed.
The dimensions are calculated.
The size is calculated.
The source code is generated!
The source code is copied to the clipboard when double-clicked upon.
I'm still trying to enhance the page but it's pretty much finished.
Just tell me what you think. If reactions are positive and enough people are interested in this I will release the page A.S.A.P.

cLord ;)

Polo
07-08-2004, 11:19 AM
wow sounds good...

but do i really need to register just to priview it? what about posting a screenshot instead.....

Our Sponsors
 

cLord
07-08-2004, 11:25 AM
OOPS :o

My mistake, you don't have to register to access the page anymore!
I did this while is was working on the page...

cLord :)

Polo
07-08-2004, 11:42 AM
yup, that looks good cLord, exactly what i was expecting.. keep up the good work...

Our Sponsors
 

Brian
07-08-2004, 01:50 PM
You stole my 'Link to Us' page. :p
Looks good though. :)

cLord
07-08-2004, 03:04 PM
You stole my 'Link to Us' page. :p
Looks good though. :)
I was jealous! :D

cLord ;)

Polo
07-08-2004, 03:22 PM
are you going to release it?

orca
07-08-2004, 04:14 PM
Looks really great. Would be interrested.

Polo
07-08-2004, 04:17 PM
yeah me too..

Brian
07-08-2004, 04:21 PM
I don't think I really read over the post well enough the first time because I didn't notice that you said the script automatically generates all of that info for you... Very nice job. :) I think a quite a few people would find this useful for a new CMPS page, or for their 'Link to Us' page on the links direcotry.

Pseudomizer
07-09-2004, 04:32 AM
Smile. Nice to see you like my hack. I would kindly like to ask to add something to the hack: You are missing the information that you can double-click it. During my development time 90% of the users cut&pasted the source code because they didn't knew that they can double-click it.

Go for it.

Cheers,

Pseudomizer

PixelFX
07-09-2004, 07:20 AM
I'd love to get that hack :P looks cool!

cLord
07-09-2004, 08:04 AM
@ Pseudomizer!: That info is shown when you move your mouse over a banner...
I'm still waiting for Richard to say yes so I can release this. ;)

*EDIT*
Just added this page to the online locations...

Polo
07-09-2004, 09:20 AM
I will wait patiently lol

mholtum
07-09-2004, 10:46 AM
Don't get me wrong, that is a sweet addition. But, what is the point to have it collapsible when there is no other content on that page?

cLord
07-09-2004, 11:22 AM
You have a point there mholtum!

But...

As this page can act as a normal module on the CMPS page I wanted this option present. ;)

cLord

mholtum
07-09-2004, 11:23 AM
You have a point there mholtum!

But...

As this page can act as a normal module on the CMPS page I wanted this option present. ;)

cLord
That makes sense.. Like your site, I registered.

cLord
07-09-2004, 11:29 AM
Saw that, that's very kind of you!

Thank you,
cLord :)

mholtum
07-11-2004, 09:43 PM
not kind.. I dont register at just any site.. Yours seemed organized, and friendly, so I registered.. ;)

Polo
07-12-2004, 09:11 AM
Thanks cLord for releasing this, and is true what mholtum, you have a really nice site there... keep up the good work ;)

Fiber
07-12-2004, 04:51 PM
I know this one is more than likely due to my error, but I am getting this error when I go to the page.

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/mastmark/public_html/forum/modules/banners.php on line 3

Parse error: parse error, unexpected T_VARIABLE in /home/mastmark/public_html/forum/modules/banners.php on line 3

Any suggestions?

This has to be sad to mess suomething up so easy.

Fiber

Polo
07-12-2004, 05:22 PM
mmm... did you uploaded the files in ascii mode?

Fiber
07-12-2004, 05:32 PM
Yes, I did


Fiber

Polo
07-12-2004, 05:36 PM
mm... wait for an answer from clord, i'm pretty sure he will be able to help you.

mholtum
07-13-2004, 12:59 AM
Hmmm I get error messages and my banners page is blank. If I turn off the module the errors go away.

cLord
07-13-2004, 01:08 AM
@ Fiber: take a look at this: http://www.easilysimplecalendar.com/forums/showthread.php?t=2334

cLord ;)

cLord
07-13-2004, 01:10 AM
@ mholtum: Thats because your forum is in a sub dir and not in the root dir of your server...
The script simply looks in the wrong dir!

I'll adjust the php file...

cLord ;)

poseidon
07-13-2004, 01:24 AM
Not trying to sound rude or dumb :D but whats the difference between the above code and what I'm using now: http://gamingevolved.com/main/index.php?page=link

I just wanna know the difference incase I should switch but based on looks I'm not seeing awhole lot that sets them apart.

mholtum
07-13-2004, 02:06 AM
hmm

mholtum
07-13-2004, 02:08 AM
The page is generated, but is blank.
/forum/images/banners this is the path to my banners dir with images.

What am I doing wrong?

Fiber
07-13-2004, 02:38 AM
Thanks Clord!

It was uploading in the write mode, but I used "wordpad" to create thephp. file. So I went back and used "note pad". Never had that problem before but it worked.

Great hack,

Fiber

cLord
07-13-2004, 09:30 AM
@ Fiber: Glad it worked for you!
@ mholtum, can you come out on MSN please? I think I got the solution...

cLord ;)

orca
07-13-2004, 12:00 PM
Thnx for the hack. Will install it tonight.

mholtum
07-13-2004, 01:45 PM
@ mholtum, can you come out on MSN please? I think I got the solution...

cLord ;)
Done, and Done. Thanks

kjell
07-14-2004, 03:00 AM
Thanks for this module!

I made a small change in banners.php so it checks the files and supports Flash Movies if someone needs that.
<?php
$banner = '';
$path = '/home/whooxcom/public_html/images/banners';// Change this to your banners path (NO TRAILING SLASH)
$url = 'http://www.whoox.com/images/banners'; // Change this to your banners URL (NO TRAILING SLASH)
$handle=opendir($path);
while ($file = readdir($handle)) {
$filelist[] = $file;
}
closedir($handle);
asort($filelist);
while (list ($a, $file) = each($filelist)) {
if ($file != "." && $file != ".." && !is_dir($file)) {
$extension = substr($file, (strrpos($file, '.')));
if ($extension == '.jpg' || $extension == '.gif' || $extension == '.png' || $extension == '.swf') {
$image = "$path/$file";
$info = getimagesize($image);
$id = filesize($image);
$size = round ($id / 1024 ,2);
if ($extension == '.swf') {
$banner .= "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" " . $info[3] . "" . " title=\"Double-click on the box below to copy the code into your clipboard! (IE only!)\">
<param name=\"movie\" value=\"" . $url . "/" . $file . "\">
<param name=\"quality\" value=\"high\">
<param name=\"wmode\" value=\"transparent\">
<param name=\"menu\" value=\"false\">
<embed src=\"" . $url . "/" . $file . "\" quality=\"high\" wmode=\"transparent\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" " . $info[3] . "></embed>
</object><br />
<span class=\"smallfont\"><b>" . $file . "</b> (" . $info[0] ."x". $info[1] . " - " . $size . "kb)</span><br /><br />
<a ondblclick='java_script_:window.clipboardData.setData(\"Text\",this.innerText); alert(\"Code copied to clipboard!\");'>
<pre><div class=\"alt2\" style=\"margin:0px; padding:6px; border:1px inset;width:550px; height:165px; overflow:auto; text-align:left\">
<code style=\"white-space:nowrap\">&lt;!-- $vboptions[bburl] Banner Start --&gt;<br />
&lt;object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" " . $info[3] . "&gt;<br />
&lt;param name=\"movie\" value=\"" . $url . "/" . $file . "\"&gt;<br />
&lt;param name=\"quality\" value=\"high\"&gt;<br />
&lt;param name=\"wmode\" value=\"transparent\"&gt;<br />
&lt;param name=\"menu\" value=\"false\"&gt;<br />
&lt;embed src=\"" . $url . "/" . $file . "\" quality=\"high\" wmode=\"transparent\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" " . $info[3] . "&gt;&lt;/embed&gt;<br />
&lt;/object&gt;<br />
&lt;!-- $vboptions[bburl] Banner End --&gt;</code></div></pre></a><br /><br />";
} else {
$banner .= "<img src=\"" . $url . "/" . $file . "\" " . $info[3] . " alt=\"Double-click on the box below to copy the code into your clipboard! (IE only!)\"><br />
<span class=\"smallfont\"><b>" . $file . "</b> (" . $info[0] . "x" . $info[1] . " - " . $size . "kb)</span><br /><br />
<a ondblclick='java_script_:window.clipboardData.setData(\"Text\",this.innerText); alert(\"Code copied to clipboard!\");'>
<pre><div class=\"alt2\" style=\"margin:0px; padding:6px; border:1px inset;width:75%; height:80px; overflow:auto; text-align:left\">
<code style=\"white-space:nowrap\">&lt;!-- $vboptions[bburl] Banner Start --&gt;<br />
&lt;a href=\"$vboptions[bburl]\"&gt;<br>
&lt;img src=\"" . $url . "/" . $file . "\" <br />border=\"0\" height=\"" . $info[1] . "\" width=\"" . $info[0] . "\" alt=\"$vboptions[hometitle]\"&gt;&lt;/a&gt;<br />
&lt;!-- $vboptions[bburl] Banner End --&gt;</code></div></pre></a><br /><br />";
}
}
}
}
$collapseobj_banners = $vbcollapse['collapseobj_banners'];
$collapseimg_banners = $vbcollapse['collapseimg_banners'];

eval('$home[$mods[\'modid\']][\'content\'] .= "' . fetch_template('adv_portal_banners') . '";');
?>

oldfan
08-09-2004, 12:45 PM
i did everything the install said, but my http://bbs.metallifukinca.com/index.php?page=banners isn't showing up :(
Everythign on the http://bbs.metallifukinca.com/cmps_index.php looks fine.
Could someone help me out?

thanks

KW802
08-09-2004, 01:36 PM
You stole my 'Link to Us' page. :p
Looks good though. :)
You have a 'link to us' page? :confused:

oldfan
08-10-2004, 01:37 AM
i did everything the install said, but my http://bbs.metallifukinca.com/index.php?page=banners isn't showing up :(
Everythign on the http://bbs.metallifukinca.com/cmps_index.php looks fine.
Could someone help me out?

thanks

anyone?

mholtum
08-10-2004, 01:51 AM
Why is it displaying on your index page? Did you want that like that?

oldfan
08-10-2004, 02:17 AM
I just followed the install :(
I'd rather have a link to a seperate banner page

mholtum
08-10-2004, 02:51 AM
go into your CMPS edit pages and remove it from the ones you dont want to display it and make sure it is enabled on your banner page.

Polo
08-10-2004, 09:24 AM
make sure you give permissions to everyone to view it and make sure you add the templates required...

oldfan
08-10-2004, 10:31 AM
ugh, I dunno what I'm doing wrong :(

KW802
08-10-2004, 11:20 AM
cLord,

I like the instructions file! Very nice -- Is that something the rest of us may borrow for our own releases? :D

Also, if you haven't already you should release this over at VB.org, I think it'd be a popular item.

oldfan
08-27-2004, 12:05 AM
i must be a n00b, I cannot get this addon to work :(

joeychgo
08-27-2004, 03:35 AM
One thing I noticed - the code generated is not BB code, and alot of forums only allw bb code in the signature --- is there a way to have both listed?

joeychgo
08-27-2004, 03:50 AM
cLord ---- where did you get the module "WhooX Services" on that page?

mholtum
08-27-2004, 04:14 AM
That is the same mopule I am using, basically, with an altered HTML template. http://www.ravensrealm.net

cLord
08-27-2004, 11:36 AM
That is the same mopule I am using, basically, with an altered HTML template. http://www.ravensrealm.net
Not entirly true mholtum, they look the same but this one I made from scratch...

For instance: I didn't include the clock since most people already have a clock on there desktop...
Links in this module are based upon user permissions (admins and moderators have other links then members...)
The new posts code from Brian's welcome block is included and the welcome block was removed (no need for two logins - Nav menu & Login block)
It's collapsible...

cLord ;)

cLord
08-27-2004, 11:39 AM
cLord,

I like the instructions file! Very nice -- Is that something the rest of us may borrow for our own releases? :D

Also, if you haven't already you should release this over at VB.org, I think it'd be a popular item.
Nothing is copywrited... I stole the code from Polo ;) and altered it a bit, sure yu can use!

cLord ;)