View Single Post
  #5  
Old 08-27-2012, 02:36 PM
ChiNa ChiNa is offline
 
Join Date: Jul 2012
Posts: 457
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Scanu, After changing the DIV it suddenly worked, but I have now more than 6 lines to replace the code with.. As I said I wanna replace 6 lines with other 6 lines.. I wished it was easy as it sounds, but good news is it worked.

Its showing up 2 times, One inside POSTBUBBLE and one as normal. Like the image below, so I had to figure out what Its because I only replace the FIRST line, with the FULL CODE! And the full code is already in postbit.. and i am adding 1 more with my product! This is why.


Here is image of my finished PRODUCT:



As you can see it did work now but showing 2 times because of I only replace the first line.. Now there are 2 exact post in my postbit, and I realised I was only replacing 1 line with the full postbit code. And the original is still there.

HERE IS THE DIV OR WRAP CODE:
Code:
<div id="1" style="float:left; z-index: 1; position: Absolute;">
 <br><img src="images/tip/aqua.png">
 </div>
 <div style="z-index: 25; padding: 11px;">
 <fieldset style="background: #ffffff;
 border:2px solid #54DFFE;
 margin:1px 3px 3px 1px; padding:7px; 
 -moz-border-radius:8px;
 box-shadow: 0 0 1em #b6b6b6;
 -webkit-border-radius:8px;
 position: relative;"> MY POSTBIT CODE SHOULD BE IN HERE </fieldset>
So i was thinking instead of REPLACING so many lines, I could maybe only replace the start and the end like I showed in my first POST as an examlpe, If I could simply WRAP the dive arround it it could be better than replacing so many lines..I posted it so you could see what I was talking about, , which did work, but still not done.

Here is the large example of the finished product today:
Code:
        <template name="post_bubble_threads" templatetype="template" date="1516171819" username="ChiNaMan" version="1.0"><![CDATA[        
<div id="1" style="float:left; z-index: 1; position: Absolute;">
<br><img src="images/tip/aqua.png">
</div>
<div style="z-index: 25; padding: 11px;">
<fieldset style="background: #ffffff;
border:2px solid #54DFFE;
margin:1px 3px 3px 1px; padding:7px; 
-moz-border-radius:8px;
box-shadow: 0 0 1em #b6b6b6;
-webkit-border-radius:8px;
position: relative;"><!-- message -->
<div id="post_message_$post[postid]">
$ad_location[ad_showthread_firstpost_start]
$post[message]
</div>
<!-- / message -->
</div></fieldset>]]></template>
    </templates>
    <plugins>
        <plugin active="1" executionorder="5">
            <title>Post Bubble Cache</title>
            <hookname>cache_templates</hookname>
            <phpcode><![CDATA[if ($vbulletin->options['post_bubble_on'])
        {
        $globaltemplates = array_merge($globaltemplates, array('post_bubble_threads'));
        }]]></phpcode>
        </plugin>
        <plugin active="1" executionorder="5">
            <title>Post Bubble</title>
            <hookname>global_start</hookname>
            <phpcode><![CDATA[if ($vbulletin->options['post_bubble_on'])
        {
        $replace = '<!-- message -->';
        $vbulletin->templatecache['postbit'] = str_replace($replace,$replace.fetch_template('post_bubble_threads'),$vbulletin->templatecache['postbit']);
        $vbulletin->templatecache['postbit_legacy'] = str_replace($replace,$replace.fetch_template('post_bubble_threads'),$vbulletin->templatecache['postbit_legacy']);
        }
        ]]></phpcode>
        </plugin>
    </plugins>
The BLUE colored code is the code that I have to REPLACE or WRAP it with the red code arround, with RED. I hope you understood my point... The RED is my DIV or WRAP code, that I wanna wrap arround the BLUE colored... And Orange colored is the code I pasted in my first post!

Now I am thinking about 2 Options, 1 option to REPLACE it with another CODE, or simply use the replace to wrap the code! And I am asking you to please take a look and tell me what is best. To use the replace and replace it all with new code, or only use the replace to replace the START and the END.. (Like Wrap it)

Thats it, waiting for your reply and advice about how to REPLACE or WRAP the code. Cant wait to hear from you with this one!
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01290 seconds
  • Memory Usage 1,790KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete