![]() |
Change Find about
Hello,
Find and Replace via plugin Template: bbcode_php find: <code>{vb:raw code}</code> replace: <vb:if condition="$show['member']"> <code>{vb:raw code}</code> <vb:else /> Show this to guest only </vb:if> How do I? Thanks |
Why not just edit the template? But, besides that... have you even tested it to see if it works? You would need to have post caching turned off, I believe.
http://php.net/manual/en/function.str-replace.php |
Template with editing works, no problem
I want to do with Plugin, Is it possible to make? |
Could try something like....
hook location - bbcode_fetch_tags php: PHP Code:
|
Thank you very much,
I have a question, Is it possible to show in this way? http://awesomescreenshot.com/08a160hp88 |
You can enter the appropriate html to make the textedit box like in your screenshot. Just get the html from the source code.
If your code doesn't work, post *exactly* what you did so we can test it ourselves and see what is going on. |
For registered members
http://awesomescreenshot.com/0ad165ic85 For guests (plugin, with your code) http://awesomescreenshot.com/046165it9c I want it like this, but I could not Could you help me, I am not experienced. Note: With editing template http://awesomescreenshot.com/0c0165kd1f PHP Code:
|
Take a look at your page source for the page with those tags on it. Then copy the divs you want around it... something like:
HTML Code:
<div style="margin:5px 10px"> |
Thank you very much, okay.
|
Hello again,
I have a problem, Can you help? What you need to do not hide in the archive? Also tag ['video'] not work, Whats wrong? Thanks |
You don't want to hide the code in the archive? Those pages have THIS_SCRIPT defined as 'archive' so just add that into the condition.
As for the videos.... those don't show in the archives and I would guess you would need to go actually edit the code manually to make them show. |
Quote:
I hid URL Links into Archive. That's OK. I want to hide [php],[html],[code],[quote] into Archive. Quote:
Quote:
Okay video. I Changed $tag_list['no_option']['video'] => $tag_list['video']['php'] now ok Thanks |
if (!($vbulletin->userinfo['userid'] > 0) AND THIS_SCRIPT != 'archive')
(I'm still not sure what exact condition you wanted there so you will need to do the logic yourself.) |
Section the normal message
http://awesomescreenshot.com/09216n9j50 Archive Section (The problem here) http://awesomescreenshot.com/0d016nak95 For Archive [url],[video],[img] archive_thread_post PHP Code:
Can you help? Thanks |
I'm not really sure... but it uses the function strip_bbcode which is in the fuctions.php file. You could try using the hook strip_bbcode and set $fast_and_dirty to true? I'm not sure what that will do, but take a look at the function and you can probably do what you want.
|
I'm sorry, I am taking your time so much.
I want to write a plugin. Task of plugin is hiding [php],[html],[code],[VIDEO],[quote],[IMG],[url],[email] tags from guests. I can hide in the forum with the sample code you gave me That's ok, no problem. hook location - bbcode_fetch_tags PHP Code:
Thank you But I can not hide [php],[html],[code],[VIDEO],[quote],[IMG],[url],[email] tags in archive. I need to help here, Could you help me, please? Can you give an example? I'm beginner. Regards |
Ummmmm, hook location strip_bbcode:
PHP Code:
$stripquotes = false $fast_and_dirty = false $showlinks = true $stripimg = false $keepquotetags = false So, try setting those to what you want and see what happens. |
|
I'm sorry, but if those don't work, then you will need to actually look at the function I pointed you to and try some things out yourself. There are already mods to do all this stuff and I don't have time to go and see how they did them, so you should go do that.
|
Thank you very much for your help again
I couldn't find plugin for 4.x.x version. (hiding the bb code from guests.) Can you allow me to ask other persons by opening a new topic? Best Regards |
You are welcome to ask again about it.
|
Hello again, I'm sorry, I am taking your time so much.
l'm sorry, I'm beginner. Your Message #17 hook location strip_bbcode: PHP Code:
Is it possible to disable the this code with plugin? PHP Code:
$message; //= preg_replace($find, $replace, $message); Thanks |
If you want to disable that code, then you can set $fast_and_dirty to false and then that code won't be run.
|
When I set $fast_and_dirty=false; to false, this time else section runs.
[php],[html],[code],[VIDEO],[quote],[IMG],[url],[email] => Isn't there any way to show these tags with their contents? |
You mean like in the regular posts? You will need to basically write a plugin to do that that uses the same code used in posts.
|
functions.php line 2341
PHP Code:
Find: $regex = '#\[(?!quote)(\w+?)(?>[^\]]*?)\](.*)(\[/\1\])#siU'; Replace: $regex = '#\[(?!quote|php|html|code|video|url|img)(\w+?)(?>[^\]]*?)\](.*)(\[/\1\])#siU'; How can I replace the code above? |
I think the only way to replace it is to actually modify the file itself.
|
Thank you very much for taking the time
Best Regards |
Hello again, I'm sorry, I am taking your time so much,
What hook location for Activity Stream AND Activity Stream in Member Profile? Thanks |
I don't understand your question. But to see what hooks are being used on a particular page, you may turn on debug mode and they will all be listed on the bottom of the page in the order they are called.
|
See: http://awesomescreenshot.com/09a17haoa9
I know the list, So many options available List see: http://awesomescreenshot.com/0c117hau4b Thanks |
Those templates are "activitystream_forum_thread" (and other "activity_stream_*" templates) and so if I search in the files for where the template is rendered, it looks like it happens in the function fetchStream. You probably want to do a search in the files to find where that function gets called and see if there are any hooks just beforehand.
|
Hello again, I'm sorry, I am taking your time so much.
The code "exluded forums" below works everywhere but it doesn't work in "threadbit_process". What is the problem? Can you help? Hook: threadbit_process PHP Code:
|
Quote:
Can I ask something? Why doesn't the code above run on 4.2.0 version? Thanks... |
All times are GMT. The time now is 05:43 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|