Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Gah! Hacking woes... Details »»
Gah! Hacking woes...
Version: , by Ember Ember is offline
Developer Last Online: Mar 2006 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 01-29-2003 Last Update: Never Installs: 0
 
No support by the author.

Ok, I have myself stuck again, here is what I have:

In functions.php

PHP Code:
        if ($post['showpet']!="0") {
            eval(
"\$post[petbit] = \"".gettemplate("petbit")."\";");
        } else {
            
$post[showpet] = " ";
        } 
Along with all the rest of my pet hack stuff - I've added ^^^ that stuff above it.

Then I have added a new template called petbit and posted what was previously in the postbit tempate into it.

Then I have added $post[showpet] into the postbit.

I also have a new field in the user CP called showpet and in that I have "0"....

What should happen is it should see that showpet is set to 0 and then show the petbit... but it doesnt, it shows nothing.

Then if I change whats in the showpet field to 1 - it shows the one (when its set to 0 it shows nothing)

Any ideas what the problem is?

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 01-29-2003, 07:12 PM
Ember's Avatar
Ember Ember is offline
 
Join Date: Sep 2002
Location: Hereford, England
Posts: 200
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Scrap that, I think i got it...
Reply With Quote
  #13  
Old 01-29-2003, 07:14 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try this:

PHP Code:
if ($post[showpet]!=0) {
            eval(
"\post[petbit] = \"".gettemplate("petbit")."\";");
        } else {
            
$post[petbit]= "";
        } 
Reply With Quote
  #14  
Old 01-29-2003, 07:15 PM
Ember's Avatar
Ember Ember is offline
 
Join Date: Sep 2002
Location: Hereford, England
Posts: 200
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

edit:

Ok... so I now have it showing the petbit ok, but the stats dont show for each person... it shows blank stats, do I have to change the information in the petbit template to $post[php] for the pet hp etc.?
Reply With Quote
  #15  
Old 01-29-2003, 07:19 PM
Ember's Avatar
Ember Ember is offline
 
Join Date: Sep 2002
Location: Hereford, England
Posts: 200
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

GAWD. More trouble than its bloody worth...

It only selects wether to show YOUR pet... not EVERYONES :'(

*gives up*

*goes home*

*comes back to see if anyone can help*
Reply With Quote
  #16  
Old 01-29-2003, 07:21 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

First of all, what code did you finally get it to work with? Second, what are the contents of the template?
Reply With Quote
  #17  
Old 01-29-2003, 07:27 PM
Ember's Avatar
Ember Ember is offline
 
Join Date: Sep 2002
Location: Hereford, England
Posts: 200
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here's what I put to make it work:

PHP Code:
        if ($post['showpet']!=0) {
                    eval(
"\$post[petbit] = \"".gettemplate("petbit")."\";");
                } else {
                    
$post[petbit] = "";
                } 
and then this is the content of the template:

PHP Code:
<table cellspacing="0" width="100%" cellpadding="1" style="border-left:1px solid {tablebordercolor}; border-top:1px solid {tablebordercolor};">
<
tr>
<
td colspan="2" bgcolor="$post[backcolor]style="border-right:1px solid {tablebordercolor}; border-bottom:1px solid {tablebordercolor};"><smallfont>$post[username]'s pet - <b> $post[petname]</b></smallfont></td>
</tr>
<tr>
<td colspan="2" style="border-right:1px solid {tablebordercolor};">
<smallfont>
<b>Type:</b> $pettype1 <br>
<b>Gender:</b> $post[petgender1]
</td>
</tr>
<tr>

<td bgcolor="$post[backcolor]" style="border-bottom:1px solid {tablebordercolor};" width="50">
<smallfont><center>
<img src="images/pets/$post[pettype1]$post[petgender1].gif"></img>
</td>
<td style="border-right:1px solid {tablebordercolor}; border-bottom:1px solid {tablebordercolor};"><smallfont>
                  <b>Level: $pshowlevel<br>
                    HP: $php / $pmaxhp 
                  <table width="90" style="border:1px solid {tablebordercolor};" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td bgcolor="$post[backcolor]"><img src="images/bar/pbhg.gif" width="$phpf%" height="5"><img src="images/bar/pbhb.gif" width="1" height="5"></td>
                    </tr>
                  </table>
                                  Exp: $pep% 
                  <table  style="border:1px solid {tablebordercolor};"  width="90" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td bgcolor="$post[backcolor]"><img src="images/bar/pbxg.gif" width="$pep%" height="5"><img src="images/bar/pbxb.gif" width="1" height="5"></td>
                    </tr>
</table>
</table> 
It shows the users petname up fine... other than that its a no show!
Reply With Quote
  #18  
Old 01-29-2003, 07:39 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here's the line for the image, right?

PHP Code:
<img src="images/pets/$post[pettype1]$post[petgender1].gif"></img
Is it not showing the image or none of the template?
Reply With Quote
  #19  
Old 01-29-2003, 07:44 PM
Ember's Avatar
Ember Ember is offline
 
Join Date: Sep 2002
Location: Hereford, England
Posts: 200
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I changed that to try to get it to work (it didnt)

the original was... $pettype$petgender.gif

i changed it to what you quoted in an attempt to get it to work.
Reply With Quote
  #20  
Old 01-29-2003, 07:45 PM
Ember's Avatar
Ember Ember is offline
 
Join Date: Sep 2002
Location: Hereford, England
Posts: 200
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Its showing the template ok... but not showing the pet gender or type - or the pet stats.
Reply With Quote
  #21  
Old 01-29-2003, 07:48 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Ember
I changed that to try to get it to work (it didn't)

the original was... $pettype$petgender.gif

i changed it to what you quoted in an attempt to get it to work.
What I quoted is what you have in the code you posted above. Why don't you just call the images directly? Do you need the gender and type if you already have a different name for each one?

If you want, send me all the code you have for the hack and I will see if I can get it going.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:03 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05047 seconds
  • Memory Usage 2,323KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete