| | |
| Stránka: 1 z 1
| [ Príspevkov: 6 ] | |
Autor | Správa |
---|
Registrovaný: 09.09.07 Prihlásený: 07.11.16 Príspevky: 3114 Témy: 233 Bydlisko: Nové Zámky |
Potreboval by som nejak tak upravit sablonu, aby som v kazdej teme druhy prispevok mal taky, aky chcem..
proste to bude vyzerat normalne, ako keby to pridal nejaky uzivatel, ale miesto mena tam zadam volaco a ako text prispevku tam zadam tiez volaco ja...
ako na to ?? neviem kde v template to mam hladat.. som skusal to menit hore dole a nic...
_________________ "It took a lot of work, but this latest Linux patch enables support for machines with 4096 CPUs, up from the old limit of 1024." "Do you have support for smooth full-screen flash video yet?" "No, but who uses that?"
- ak dlho neodpisujem do témy, zabudol som na ňu, takže ma upozornite SS, ak chcete moju odpoveď |
|
Registrovaný: 26.11.06 Prihlásený: 22.01.24 Príspevky: 4118 Témy: 319 Bydlisko: HE/BA | Napísal Flety: 19.02.2009 23:48 | |
|
Chceš tam mať reklamu? je na to viacero modov, stačí hľadať a určite to budeš vedieť upraviť tak ako to chceš mať
|
|
Registrovaný: 09.09.07 Prihlásený: 07.11.16 Príspevky: 3114 Témy: 233 Bydlisko: Nové Zámky |
heh, tak porad nejaky mod. neviem pod akym nazvom to hladat
_________________ "It took a lot of work, but this latest Linux patch enables support for machines with 4096 CPUs, up from the old limit of 1024." "Do you have support for smooth full-screen flash video yet?" "No, but who uses that?"
- ak dlho neodpisujem do témy, zabudol som na ňu, takže ma upozornite SS, ak chcete moju odpoveď |
|
Registrovaný: 26.11.06 Prihlásený: 22.01.24 Príspevky: 4118 Témy: 319 Bydlisko: HE/BA | Napísal Flety: 20.02.2009 0:11 | |
|
skus reklama po anglicky
|
|
Registrovaný: 09.09.07 Prihlásený: 07.11.16 Príspevky: 3114 Témy: 233 Bydlisko: Nové Zámky |
dik, nasiel som:
Kód: ############################################################################################################# ## MOD Title: Adverts In Posts ## MOD Author: Dale Rodgers < dalerodgers38@hotmail.com > (Dale Rodgers) http://www.tntboards.com ## MOD Description: Automatically displays an advert in a topic as a post. ## MOD Version : 1.3.7 ## ## Installation Level : Easy ## ## Installation Time : ~30 Secs ## ## Files To Edit : viewtopic.php ## ## ## Included Files : None ## ## ############################################################################################################ ## For Security Purposes, Please Check: http://www.phpbbhacks.com/allhacks.php for the ## latest version of this MOD. Downloading this MOD from other sites could cause malicious code ## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered ## in our MOD-Database, located at: http://www.phpbbhacks.com/allhacks.php ############################################################################################################ ## Author Notes: ## This MOD was made to have adverts on your forum without ruining the design or looking nasty. ## ## - Abilty to change the advert ## - Ability to change how many ads are displayed per topic ############################################################################################################ ## Other Notes: ## You need to replace Ad Code Here with your ad code. ############################################################################################################ ############################################################################################################ ## MOD History: ## ## ## 2005-02-06 - Version 1.3.7 ## - First release of the MOD ## ## ############################################################################################################ ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ############################################################################################################
# #-----[ OPEN ]------------------------------------------ # viewtopic.php
# #-----[ FIND ]------------------------------------------ # $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2']; $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
# #-----[ REPLACE WITH ]------------------------------------------ # $row_color = ( !($num % 2) ) ? $theme['td_color1'] : $theme['td_color2']; $row_class = ( !($num % 2) ) ? $theme['td_class1'] : $theme['td_class2']; $num ++;
# #-----[ FIND ]------------------------------------------ # 'U_POST_ID' => $postrow[$i]['post_id']) );
# #-----[ AFTER, ADD ]------------------------------------------ # if($i == $ad_after) { $row_color = ( !($num % 2) ) ? $theme['td_color1'] : $theme['td_color2']; $row_class = ( !($num % 2) ) ? $theme['td_class1'] : $theme['td_class2']; $num ++;
$mini_post_url = append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $postrow[$i]['post_id']) . '#ad'; $template->assign_block_vars('postrow', array( 'ROW_COLOR' => '#' . $row_color, 'ROW_CLASS' => $row_class, 'POST_DATE' => $post_date, 'POST_SUBJECT' => 'Advertisement', 'MINI_POST_IMG' => $mini_post_img, 'POSTER_NAME' => 'Advertisement', 'POSTER_RANK' => 'Advertiser', 'MESSAGE' => '<div align="center">Ad code here</div>', 'L_MINI_POST_ALT' => $mini_post_alt, 'U_MINI_POST' => $mini_post_url, 'U_POST_ID' => 'ad') ); }
# #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ #
_________________ "It took a lot of work, but this latest Linux patch enables support for machines with 4096 CPUs, up from the old limit of 1024." "Do you have support for smooth full-screen flash video yet?" "No, but who uses that?"
- ak dlho neodpisujem do témy, zabudol som na ňu, takže ma upozornite SS, ak chcete moju odpoveď |
|
Registrovaný: 01.05.05 Príspevky: 13343 Témy: 1494 Bydlisko: Bratislava | Napísal JanoF: 20.02.2009 0:44 | |
|
EDIT VIEWTOPIC.PHP
In viewtopic.php in the main phpBB directory, at around line 826, you'll find:
Kód: // // Okay, let's do the loop, yeah come on baby let's do the loop // and it goes like this ... // Right under that is the statement that begins the looping through the posts: Kód: for($i = 0; $i < $total_posts; $i++) { Under that I added... Kód: if ($i=="0") { $adblock = $adblocktext; } else { $adblock = ""; } Up near the beginning of the file, I defined the new variable $adblocktext thusly: Kód: $adblocktext = <<<EOM <tr><td colspan=2 align=center> Insert your Google AdSense Code Here </td></tr> <tr><td class="spaceRow" colspan="2" height="1"><img src="templates/subSilver/images/spacer.gif" alt="" width="1" height="1" /></td> </tr> EOM; The table structure here is important. The first block puts in your Google AdSense code. The second block is a separator line. Now, scroll down to the line 1170'ish range of the file and you'll find a block of variable declarations that begins with: Kód: $template->assign_block_vars('postrow', array( 'ROW_COLOR' => '#' . $row_color, 'ROW_CLASS' => $row_class, In that block, on its own line, add: Kód: 'AD_BLOCK' => $adblock, Save that file. EDIT VIEWTOPIC_BODY.TPL Now go into the templates directory, and into the subdirectory of the template you are using (i.e. subSilver). Open the file viewtopic_body.tpl for editing. Down around line 61, you'll find a line that says: Kód: <!-- END postrow --> Right above it, add the following text... Kód: {postrow.AD_BLOCK} Save the file, and you're done! Now your forums will insert whatever you wish after the first post. And yes, you can insert Javascript. I tried the following... Kód: $adblocktext = <<<EOM <tr><td colspan=2 align=center> Insert Google Code Here <P> <script language=javascript> document.write("hoobastank"); </script> </td></tr> <tr><td class="spaceRow" colspan="2" height="1"><img src="templates/subSilver/images/spacer.gif" alt="" width="1" height="1" /></td> </tr> EOM;
and it worked just fine.
//neskusal som to ale, takychto uprav je velmi vela, staci hladat google.com, phpbbhacks.com etc..
_________________ Streacom DA2 | SilverStone Titanium SX800-LTI 800W | ASRock X299E-ITX/ac | Intel Core i9-9980XE & be quiet! Dark Rock TF | Kingston HyperX Impact 64 GB DDR4 2666 MHz | NVIDIA Titan RTX 24 GB | Intel SSD Optane 905P 480 GB NVMe U.2 & Intel SSD 750 1,2 TB NVMe U.2 & Intel SSD 660p 2 TB NVMe M.2 & Seagate BackUp Plus Portable 56 TB USB | 55" 4K OLED Dell Alienware AW5520QF & 24" LCD EIZO FlexScan EV2451 | Ergotron LX Wall Mount Keyboard Arm | Logitech Craft | Logitech G603 | Logitech F710 | Harman Kardon Sabre SB 35 & Sennheiser RS 175 | Microsoft Windows 7 Ultimate | APC Back-UPS ES 700 | Lenovo ThinkPad X250 | iPhone X 256 GB & Pitaka Aramid | SilverStone ML05B Milo | Corsair SF600 SFX 600W | ASRock X99E-ITX/ac | Intel Xeon E5-2683 v4 & NOCTUA NH-L12S | Kingston HyperX Savage 32 GB DDR4 2400 MHz | NVIDIA GeForce GT 710 1 GB | Intel SSD Optane Memory 32 GB NVMe M.2 & Intel SSD 730 240 GB SATA | Ubuntu Server |
|
| Stránka: 1 z 1
| [ Príspevkov: 6 ] | |
| Nemôžete zakladať nové témy v tomto fóre Nemôžete odpovedať na témy v tomto fóre Nemôžete upravovať svoje príspevky v tomto fóre Nemôžete mazať svoje príspevky v tomto fóre
|
|