vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   vba CMPS: Smilie Creator (https://vborg.vbsupport.ru/showthread.php?t=68062)

Polo 08-13-2004 03:01 PM

Working nice at our website, as a center module, thanks for this cool addon! ;)

KW802 08-13-2004 03:08 PM

Quote:

Originally Posted by Polo
Working nice at our website, as a center module, thanks for this cool addon! ;)

https://vborg.vbsupport.ru/external/2009/02/1.gif Thanks, good to hear! I just wish everybody's install would go as smooth. Except for this Windows server issue I think I have all of the Unix/Linux people up & running.

Today's learning lesson for me will be to find out why parsing an array in PHP works fine on the Unix/Linux boxes but not on a Windows box. Man, I guess I am a geek.... I love doing this kind of stuff. I think the time has also come for me to visit my local Barnes & Noble up for some PHP books.

KW802 08-31-2004 12:43 AM

Here's a small & quick modification to the template for vBa CMPS users to help encourage your visitors to register!

What I've noticed on the sites that have installed the Smilie Creator is that they either leave the security settings wide open so that anybody can use it or they turn the page off for users not logged in. One of my goals with this (besides it being a learning experiment :p ) was to help encourage users to register but with security opened up to everybody visitors had no reason to register and even then they couldn't see what benefit registering would do for them. Plus for people who implemented this as a module, instead of page, they couldn't restrict access to it as easily as people who implemented it as a new page.

The solution is a quick change to the template to use a vBulletin conditional to restrict access to the "create" button to only users logged in. Simple but I think it does the job so far. :)

A screen shot of this modification showing the output to visitors not logged in is attached.

To make this change find the following code in your template:
Code:

<td align="center" valign="middle" colspan="2" class="alt1">
<br/><input type="button" name="Create_Smilie" value="Create my custom smilie!" onclick="createSmilie(get_radio_value(),document.smilie_form.text.value,document.smilie_form.col.value,document.smilie_form.shcol.value)"/>
</td>

And replace it with this code:
Code:

<td align="center" valign="middle" colspan="2" class="alt1">
<br/>
<if condition="$bbuserinfo[userid]">
        <!-- CODE TO DISPLAY IF THE USER IS LOGGED IN -->
        <input type="button" name="Create_Smilie" value="Create my custom smilie!" onclick="createSmilie(get_radio_value(),document.smilie_form.text.value,document.smilie_form.col.value,document.smilie_form.shcol.value)"/>
<else />
        <!-- MESSAGE FOR GUESTS -->
        <hr width="95%">
        <strong>If you were logged in right now a button would be here so that you could create your new smilie! If you haven't registered yet just click <a href="$vboptions[bburl]/register.php?$session[sessionurl]">here</a>. <i>It's fast, easy and free!</i></strong>
        <hr width="95%">
</if>
</td>

If you come up with any other modifications that you'd like to share with the community please feel free to post your ideas! To be emailed any major updates or changes click "Install" in the upper-right hand corner of this thread.



IMPORTANT: If you're running the original 1.0.0 version of the template the command line has changed in the 1.0.1 template! You'll need to make the following modificatins only if you're using the original 1.0.0 template otherwise if you're using the newer version of the template use the code above. Only use the code below if you're using the original version of the template: Look for this code:
Code:

        <td align="center" valign="middle" colspan="2" class="alt1">
Code:

<br/>
        <input type="button" name="Create_Smilie" value="Create my custom smilie!" onclick="createSmilie(get_radio_value(),document.smilie_form.text.value,document.smilie_form.col.value,docume nt.smilie_form.shcol.value)"/>
 
</td>


And change it to:
Code:

<td align="center" valign="middle" colspan="2" class="alt1">
Code:

<br/>
<if condition="$bbuserinfo[userid]">
<!-- CODE TO DISPLAY IF THE USER IS LOGGED IN -->
<input type="button" name="Create_Smilie" value="Create my custom smilie!" onclick="createSmilie(get_radio_value(),document.smilie_form.text.value,document.smilie_form.col.value,document.smilie_form.shcol.value)"/>
<else />
<!-- MESSAGE FOR GUESTS -->
<hr width="95%">
<strong>If you were logged in right now a button would be here so that you could create your new smilie! If you haven't registered yet just click <a href="$vboptions[bburl]/register.php?$session[sessionurl]">here</a>. <i>It's fast, easy and free!</i></strong>
<hr width="95%">
</if>
</td>



For some reason there keeps getting extra spaces inserted into the word "form" and "document" in the revised input command above. I've tried modifying it several times now and for some reason vBulletin keeps putting the spaces back in. In the revised code you'll need to remove the extra spaces before saving your template otherwise your page won't work and will display a script error message. :ermm:

YLP1 08-31-2004 01:07 AM

Quote:

Originally Posted by KW802
https://vborg.vbsupport.ru/external/2009/02/1.gif Thanks, good to hear! I just wish everybody's install would go as smooth. Except for this Windows server issue I think I have all of the Unix/Linux people up & running.

Today's learning lesson for me will be to find out why parsing an array in PHP works fine on the Unix/Linux boxes but not on a Windows box. Man, I guess I am a geek.... I love doing this kind of stuff. I think the time has also come for me to visit my local Barnes & Noble up for some PHP books.

Hi KW802, you make any headway on the issues I had posted? I would love to use this but I still have those issues.

KW802 08-31-2004 01:23 AM

Quote:

Originally Posted by YLP1
Hi KW802, you make any headway on the issues I had posted? I would love to use this but I still have those issues.

I didn't forget about you, I just don't have access to a windows box for testing. What I'm trying to do is piece together enough components from my spare parts bin to set up a box for testing. Why standard PHP would work fine on Unix/Linux boxes but not a Windows box has me puzzled yet but I'm determined to get a solution. :ermm:

YLP1 08-31-2004 01:41 AM

Thank so you much....I will patient....

venomx 09-06-2004 06:43 AM

Hey what is smilies.psd in the zip?

KW802 09-06-2004 02:14 PM

Quote:

Originally Posted by venomx
Hey what is smilies.psd in the zip?

VenomX,

It is a template smilie face so that new smilies can be created from it. It was part of the original VB2.x hack that this conversion was based upon. To create additional/new smilie faces use the PSD to make your smilie to how ever you'd like it and then when you upload it to your server just change the template to include it. As long as the new smilie is the same dimensions as the template then it'll work fine.

Kevin

Blam Forumz 09-25-2004 02:00 PM

I get it to work, but when you save image as, it saves it as .php

help

KW802 09-25-2004 02:04 PM

Quote:

Originally Posted by Blam Forumz
I get it to work, but when you save image as, it saves it as .php

help

Blam Forumz, are you using the most recent version of the template & code? The last revision should've taken care of that problem.


All times are GMT. The time now is 09:36 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01170 seconds
  • Memory Usage 1,759KB
  • 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
  • (6)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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