• Welcome to PHPVIBE Forums. Please log in.

[ Video Sharing CMS v4 ] How to create a custom page?

Started by hamnawa,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

hamnawaTopic starter

Hello,

Could you guys please explain how to create an empty page int he new version?
  •  

Marius P.

Here is a very fast structure :

Create a file com/com_mypage.php
<?php
//Page title
function modify_title( $text ) {
return 'This is my title';
}
//Page content
function modify_content( ) {
$text = '<h1>This is a heading</h1>';
$text = .'<h2>This is a heading</h2>';
$text = .'<p>This is the content</p>';
return $text;
}
add_filter( 'phpvibe_title', 'modify_title' );
add_filter( 'the_defaults', 'modify_content' );
//Time for design
the_header();
include_once(TPL.'/default.php');
the_footer();
?>



Open index.php (main/root one):


find:


case "register":
      $com_route = ABSPATH."/com/com_register.php";     
      break;



after add


case "mypage":
      $com_route = ABSPATH."/com/com_mypage.php";     
      break;



This small example should be seen at {your-site-url}/mypage/


This is just a small code example, you can change it to fit your needs.


I'm adding a dynamic pages engine to 3.4
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

vingar

I have a problem with latest beta, this hack dont work, any suggest?
  •  

PHPVibe A.

You don't need this hack, now you can create pages from the admin panel, this was written 1 year ago.

vingar

thanks, but my problem is insert a php code with div etc, the page change my code. how can i solved this problem?
  •  

PHPVibe A.

You can't insert php code, if you wish to add html use the "source" on the editor.

zeepakos

Hello alexander i followed all these rules i created this file on com/com_mypage.php and next what i need to do i find in all sides but not able to search index.php where i need to put this code -- > case "mypage":
      $com_route = ABSPATH."/com/com_mypage.php";     
      break;
please help me Thanks.
  •  

 

Similar topics (7)

Important Announcement: PHPVibe Video Sharing CMS End of Life

Started by Marius P.


Replies: 1
Views: 36919

The problem of video viewing PHPVibe 5.0

Started by Nayn


Replies: 25
Views: 68199

embed video does not work on v5

Started by neospider69


Replies: 6
Views: 47585

Better Idea for PHPVibe v5 Channels page

Started by DeadFish


Replies: 2
Views: 3522

insite ads issue when selecting above/below video player location

Started by georgepanaitescu


Replies: 3
Views: 20318

Video that I've uploaded needs to have that value in admin to upload

Started by spirog


Replies: 4
Views: 3520

video,playlist,images, etc. (frontend) select all deselect all reselect all

Started by spirog


Replies: 3
Views: 3650